JSDoc: Class: Windows

# 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:
  - browser.js, line 420

### Methods

#### get(id) → {Window}

Get the window object stored by provided |id|.

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | string | Outer window ID.

Source:
  - browser.js, line 451

##### 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:
  - browser.js, line 433

##### Returns:

Instance of self.

Type
  browser.Windows