Wren

chrome.windows

Wren's windows (src/page/ext_api.odin, ext_tabs.odin). type "popup" makes the popout window: one tab, no tab strip, no toolbar.

Gate: no permission; contexts: Background, Popup, Tab. Source: api/ext_windows.widl.

Methods and properties

MemberResultStatusGate
getCurrent(optional QueryOptions queryOptions)WindowhostThe window of the calling page, else the focused one.
getLastFocused(optional QueryOptions queryOptions)Windowhost
getAll(optional QueryOptions queryOptions)Window[]host
get(i64 windowId, optional QueryOptions queryOptions)Windowhost-2: the current window.
create(optional CreateData createData)Windowhost
update(i64 windowId, optional UpdateInfo updateInfo)Windowhostfocused and the position are applied; the size and the state are not yet.
remove(i64 windowId)voidhost

Events

EventListener's parametersGate
onFocusChangedi64 windowId-1: no window of Wren has the focus.
onRemovedi64 windowId
onCreatedWindow window
onBoundsChangedWindow window

Constants

  • WINDOW_ID_NONE = -1
  • WINDOW_ID_CURRENT = -2

Types

WindowType

A string: "normal", "popup", "panel", "app", "devtools". chrome.windows.WindowType names them.

CreateType

A string: "normal", "popup", "panel". chrome.windows.CreateType names them.

WindowState

A string: "normal", "minimized", "maximized", "fullscreen", "locked-fullscreen". chrome.windows.WindowState names them.

Window

PropertyType
idi64
focusedbool
topi64
lefti64
widthi64
heighti64
incognitobool
typeWindowType
stateWindowState
alwaysOnTopbool
tabs (optional)Tab[]

QueryOptions

PropertyType
populate (optional)boolWith the window's tabs.
windowTypes (optional)WindowType[]

CreateData

PropertyType
url (optional)UrlOrUrls
tabId (optional)i64Not supported: moving a tab into the new window.
left (optional)i64
top (optional)i64
width (optional)i64
height (optional)i64
focused (optional)bool
incognito (optional)booltrue is refused: Wren has no incognito profile.
type (optional)CreateType
state (optional)WindowState
setSelfAsOpener (optional)bool

UpdateInfo

PropertyType
left (optional)i64
top (optional)i64
width (optional)i64
height (optional)i64
focused (optional)bool
drawAttention (optional)bool
state (optional)WindowState

Edit this page on GitHub