Skip to content
Browser Actions icon Home Browser Actions 2024.0.3 › Objects

Browser Actions › Objects › Browser Window

This object is a static snapshot of a browser window, representing its state at the time the snapshot was generated. It is returned by several actions, such as Get Browser Windows or Create Window.

This is a structured object and contains the following accessible attributes (also called "properties"):

PropertyTypeNotes
BrowserBrowserThe browser that this window belongs to.
Window TitleTextThe given name of the window, if it has one. Defaults to the title of the currently active tab. (See notes below.)
TabsList of Browser TabsA list of all tabs belonging to this window. (See notes below.)
Active TabBrowser TabThis window's current active tab.
Is Private?Boolean (YES/NO)Is this a private (Safari) or Incognito (Chromium) window?
Is Visible?Boolean (YES/NO)Whether the window is currently visible.

Notes on window names

Most Chromium-based browsers (Brave Browser, Chromium itself, Google Chrome, Microsoft Edge) allow users to name its windows. Safari and Vivaldi do not.

This given name is shown in the list of windows in the browser's Window main submenu. It's also returned by the object's properties (as shown in the table above). If the window does not have a name, the title of the currently active tab is used instead.

Notes on windows containing only one tab

When a window contains only one tab, and you try to access the window's "Tabs" property, Shortcuts will stop with a non-descript error. This is a bug in macOS Shortcuts, and sadly, it's nothing that I can fix. As a (hopefully temporary) workaround, and only for single-tab windows, the "Tabs" property will return the original tab twice. It's not great but better than a vague error.

How to access an object's attributes

Any object's attributes can be accessed and selected by clicking/tapping the object, for example after you have placed it in a text block or when you use it as a parameter of another action.