Class: Windows

browser.Windows()

The window storage is used to save outer window IDs mapped to weak references of Window objects.

Usage:

let wins = new browser.Windows();
wins.set(browser.outerWindowID, window);

...

let win = wins.get(browser.outerWindowID);

Constructor

new Windows()

Source:

Methods

get(id) → {Window}

Get the window object stored by provided |id|.

Parameters:
Name Type Description
id string

Outer window ID.

Source:
Throws:

If |id| is not in the store.

Type
RangeError
Returns:

Saved window object.

Type
Window

set(id, win) → {browser.Windows}

Save a weak reference to the Window object.

Parameters:
Name Type Description
id string

Outer window ID.

win Window

Window object to save.

Source:
Returns:

Instance of self.

Type
browser.Windows