JSDoc: Class: Popup

# Class: Popup

## Popup

#### new Popup(title, content)

##### Parameters:

Name | Type | Description
--- | --- | ---
`title` | string | The title of the popup window.
`content` | function | Function generating the content.

Source:
  - popup.js, line 34

### Extends

- AbstractPostable

### Members

#### window :Window

The last opened window.

##### Type:

- Window

Source:
  - popup.js, line 41

#### windowList :Array.<Window>

The list of all windows opened by this object.

##### Type:

- Array.<Window>

Source:
  - popup.js, line 46

### Methods

#### addAttributes(attributes)

Adds a attributes and values to the HTML element.

##### Parameters:

Name | Type | Description
--- | --- | ---
`attributes` | Object.<string, string> | A dictionary of attributes.

Inherited From:
  - MenuElement#addAttributes
Source:
  - menu_element.js, line 39

#### addEvents(element)

Adds navigation events to an HTML element.

##### Parameters:

Name | Type | Description
--- | --- | ---
`element` | HTMLElement | The HTML element for navigation.

Inherited From:
  - AbstractNavigatable#addEvents
Source:
  - abstract_navigatable.js, line 147

#### attachMenu(menu)

Attaches the widget to a context menu.

##### Parameters:

Name | Type | Description
--- | --- | ---
`menu` | ContextMenu | The parent menu.

Source:
  - popup.js, line 56

#### bubbleKey()

Bubble this key event.

Inherited From:
  - AbstractNavigatable#bubbleKey
Source:
  - abstract_navigatable.js, line 38

#### click(event)

Navigation on mouse click events.

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` | MouseEvent | The mouse event that fired.

Inherited From:
  - AbstractNavigatable#click
Implements:
  - MouseNavigatable#click
Source:
  - mouse_navigatable.js, line 72

#### display()

Source:
  - popup.js, line 68

#### down(event)

Navigation on downwards arrow key pressed.

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` | KeyboardEvent | The keyboard event that fired.

Inherited From:
  - AbstractNavigatable#down
Implements:
  - KeyNavigatable#down
Source:
  - key_navigatable.js, line 82

#### escape(event)

Navigation on escape key pressed.

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` | KeyboardEvent | The keyboard event that fired.

Inherited From:
  - AbstractNavigatable#escape
Implements:
  - KeyNavigatable#escape
Source:
  - key_navigatable.js, line 52

#### focus()

Inherited From:
  - MenuElement#focus
Source:
  - menu_element.js, line 73

#### generateContent() → {string}

Generates the content of the window.

Source:
  - popup.js, line 112

##### Returns:

The generated content.

Type
  string

#### generateHtml()

Forces generation of the actual DOM element.

Inherited From:
  - MenuElement#generateHtml
Implements:
  - Element#generateHtml
Source:
  - element.js, line 41

#### getHtml() → {HTMLElement}

Generates the DOM element if it does not yet exists and returns it.

Inherited From:
  - MenuElement#getHtml
Implements:
  - Element#getHtml
Source:
  - element.js, line 31

##### Returns:

The HTML element associated with this entry.

Type
  HTMLElement

#### isPosted() → {boolean}

Inherited From:
  - AbstractPostable#isPosted
Implements:
  - Postable#isPosted
Source:
  - postable.js, line 30

##### Returns:

True if element is posted in the page.

Type
  boolean

#### keydown(event)

Navigation selection on keyboard events.

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` | KeyboardEvent | The keyboard event that fired.

Inherited From:
  - AbstractNavigatable#keydown
Implements:
  - KeyNavigatable#keydown
Source:
  - key_navigatable.js, line 46

#### left(event)

Navigation on left arrow key pressed.

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` | KeyboardEvent | The keyboard event that fired.

Inherited From:
  - AbstractNavigatable#left
Implements:
  - KeyNavigatable#left
Source:
  - key_navigatable.js, line 64

#### mousedown(event)

Navigation selection on mouse down events.

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` | MouseEvent | The mouse event that fired.

Inherited From:
  - AbstractNavigatable#mousedown
Implements:
  - MouseNavigatable#mousedown
Source:
  - mouse_navigatable.js, line 48

#### mouseout(event)

Navigation selection on mouse out events.

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` | MouseEvent | The mouse event that fired.

Inherited From:
  - AbstractNavigatable#mouseout
Implements:
  - MouseNavigatable#mouseout
Source:
  - mouse_navigatable.js, line 66

#### mouseover(event)

Navigation selection on mouse over events.

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` | MouseEvent | The mouse event that fired.

Inherited From:
  - AbstractNavigatable#mouseover
Implements:
  - MouseNavigatable#mouseover
Source:
  - mouse_navigatable.js, line 60

#### mouseup(event)

Navigation selection on mouse up events.

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` | MouseEvent | The mouse event that fired.

Inherited From:
  - AbstractNavigatable#mouseup
Implements:
  - MouseNavigatable#mouseup
Source:
  - mouse_navigatable.js, line 54

#### post(xnullable, ynullable)

Posts the element at the given coordinates.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`x` | number | <nullable> | The x coordinate.
`y` | number | <nullable> | The y coordinate.

Overrides:
  - AbstractPostable#post
Implements:
  - Postable#post
Source:
  - postable.js, line 42

#### right(event)

Navigation on right arrow key pressed.

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` | KeyboardEvent | The keyboard event that fired.

Inherited From:
  - AbstractNavigatable#right
Implements:
  - KeyNavigatable#right
Source:
  - key_navigatable.js, line 70

#### setHtml(element)

##### Parameters:

Name | Type | Description
--- | --- | ---
`element` | HTMLElement | Sets the HTML Element.

Inherited From:
  - MenuElement#setHtml
Implements:
  - Element#setHtml
Source:
  - element.js, line 36

#### space(event)

Navigation on space key pressed.

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` | KeyboardEvent | The keyboard event that fired.

Inherited From:
  - AbstractNavigatable#space
Implements:
  - KeyNavigatable#space
Source:
  - key_navigatable.js, line 58

#### stop(event)

Stops event propagation and bubbling.

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` | Event | The keyboard event that fired.

Inherited From:
  - AbstractNavigatable#stop
Source:
  - abstract_navigatable.js, line 105

#### unfocus()

Inherited From:
  - MenuElement#unfocus
Source:
  - menu_element.js, line 81

#### unpost()

Removes element from page.

Overrides:
  - AbstractPostable#unpost
Implements:
  - Postable#unpost
Source:
  - postable.js, line 47

#### up(event)

Navigation on upwards arrow key pressed.

##### Parameters:

Name | Type | Description
--- | --- | ---
`event` | KeyboardEvent | The keyboard event that fired.

Inherited From:
  - AbstractNavigatable#up
Implements:
  - KeyNavigatable#up
Source:
  - key_navigatable.js, line 76