new Info(title, content, signature)
Parameters:
Name | Type | Description |
---|---|---|
title |
string | The title of the info box. |
content |
function | Function generating the content of the box. |
signature |
string | The final line of the info box. |
Extends
Members
className
role
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:
- Source:
addEvents(element)
Adds navigation events to an HTML element.
Parameters:
Name | Type | Description |
---|---|---|
element |
HTMLElement | The HTML element for navigation. |
- Inherited From:
- Source:
attachMenu(menu)
Attaches the widget to a context menu.
Parameters:
Name | Type | Description |
---|---|---|
menu |
ContextMenu | The parent menu. |
bubbleKey()
Bubble this key event.
- Inherited From:
- Source:
click(event)
Navigation on mouse click events.
Parameters:
Name | Type | Description |
---|---|---|
event |
MouseEvent | The mouse event that fired. |
- Overrides:
- Implements:
- Source:
display()
down(event)
Navigation on downwards arrow key pressed.
Parameters:
Name | Type | Description |
---|---|---|
event |
KeyboardEvent | The keyboard event that fired. |
- Inherited From:
- Implements:
- Source:
escape(event)
Navigation on escape key pressed.
Parameters:
Name | Type | Description |
---|---|---|
event |
KeyboardEvent | The keyboard event that fired. |
- Overrides:
- Implements:
- Source:
focus()
- Inherited From:
- Source:
generateClose() → {CloseButton}
Returns:
The close button for the widget.
- Type
- CloseButton
generateContent() → {HTMLElement}
Returns:
The basic content element of the widget. The actual
content is regenerated and attached during posting.
- Type
- HTMLElement
generateHtml()
Forces generation of the actual DOM element.
- Overrides:
- Implements:
- Source:
generateSignature() → {HTMLElement}
Returns:
The signature element of the widget.
- Type
- HTMLElement
generateTitle() → {HTMLElement}
Returns:
The title element of the widget.
- Type
- HTMLElement
getHtml() → {HTMLElement}
Generates the DOM element if it does not yet exists and returns it.
- Overrides:
- Implements:
- Source:
Returns:
The HTML element associated with this entry.
- Type
- HTMLElement
isPosted() → {boolean}
- Inherited From:
- Implements:
- Source:
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. |
- Overrides:
- Implements:
- Source:
left(event)
Navigation on left arrow key pressed.
Parameters:
Name | Type | Description |
---|---|---|
event |
KeyboardEvent | The keyboard event that fired. |
- Inherited From:
- Implements:
- Source:
mousedown(event)
Navigation selection on mouse down events.
Parameters:
Name | Type | Description |
---|---|---|
event |
MouseEvent | The mouse event that fired. |
- Inherited From:
- Implements:
- Source:
mouseout(event)
Navigation selection on mouse out events.
Parameters:
Name | Type | Description |
---|---|---|
event |
MouseEvent | The mouse event that fired. |
- Inherited From:
- Implements:
- Source:
mouseover(event)
Navigation selection on mouse over events.
Parameters:
Name | Type | Description |
---|---|---|
event |
MouseEvent | The mouse event that fired. |
- Inherited From:
- Implements:
- Source:
mouseup(event)
Navigation selection on mouse up events.
Parameters:
Name | Type | Description |
---|---|---|
event |
MouseEvent | The mouse event that fired. |
- Inherited From:
- Implements:
- Source:
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:
- Implements:
- Source:
right(event)
Navigation on right arrow key pressed.
Parameters:
Name | Type | Description |
---|---|---|
event |
KeyboardEvent | The keyboard event that fired. |
- Inherited From:
- Implements:
- Source:
setHtml(element)
Parameters:
Name | Type | Description |
---|---|---|
element |
HTMLElement | Sets the HTML Element. |
- Inherited From:
- Implements:
- Source:
space(event)
Navigation on space key pressed.
Parameters:
Name | Type | Description |
---|---|---|
event |
KeyboardEvent | The keyboard event that fired. |
- Inherited From:
- Implements:
- Source:
stop(event)
Stops event propagation and bubbling.
Parameters:
Name | Type | Description |
---|---|---|
event |
Event | The keyboard event that fired. |
- Inherited From:
- Source:
unfocus()
- Inherited From:
- Source:
unpost()
Removes element from page.
- Overrides:
- Implements:
- Source:
up(event)
Navigation on upwards arrow key pressed.
Parameters:
Name | Type | Description |
---|---|---|
event |
KeyboardEvent | The keyboard event that fired. |
- Inherited From:
- Implements:
- Source: