new ErrorDisplay(player [, options])
Creates an instance of this class.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
player |
Player | The |
|
options |
Object |
<optional> |
The key/value store of player options. |
- Source:
- error-display.js
Extends
Methods
-
buildCSSClass()
-
Builds the default DOM
className
.- Overrides:
- Deprecated:
-
- Since version 5.
- Source:
- error-display.js
Returns:
The DOM
className
for this object.- Type
- string
-
close()
-
Closes the modal, does nothing if the
ModalDialog
is not open.- Inherited From:
- Source:
- modal-dialog.js
Fires:
Returns:
Returns itself; method can be chained.
- Type
- ModalDialog
-
closeable( [value])
-
Check to see if the
ModalDialog
is closeable via the UI.Parameters:
Name Type Argument Description value
boolean <optional>
If given as a boolean, it will set the
closeable
option.- Inherited From:
- Source:
- modal-dialog.js
Returns:
Returns the final value of the closable option.
- Type
- boolean
-
content()
-
Gets the localized error message based on the
Player
s error.- Overrides:
- Source:
- error-display.js
Returns:
The
Player
s error message localized or an empty string.- Type
- string
-
createEl()
-
Create the
ModalDialog
's DOM element- Inherited From:
- Source:
- modal-dialog.js
Returns:
The DOM element that gets created.
- Type
- Element
-
description()
-
Returns the description string for this modal. Primarily used for accessibility.
- Inherited From:
- Source:
- modal-dialog.js
Returns:
The localized or raw description of this modal.
- Type
- string
-
empty()
-
Empties the content element. This happens anytime the modal is filled.
- Inherited From:
- Source:
- modal-dialog.js
Fires:
Returns:
Returns itself; method can be chained.
- Type
- ModalDialog
-
fill()
-
Fill the modal's content element with the modal's "content" option. The content element will be emptied before this change takes place.
- Inherited From:
- Source:
- modal-dialog.js
Returns:
Returns itself; method can be chained.
- Type
- ModalDialog
-
fillWith( [content])
-
Fill the modal's content element with arbitrary content. The content element will be emptied before this change takes place.
Parameters:
Name Type Argument Description content
Mixed <optional>
The same rules apply to this as apply to the
content
option.- Inherited From:
- Source:
- modal-dialog.js
Fires:
Returns:
Returns itself; method can be chained.
- Type
- ModalDialog
-
handleKeyPress(e)
-
Handles
keydown
events on the document, looking for ESC, which closes the modal.Parameters:
Name Type Description e
EventTarget~Event The keypress that triggered this event.
- Inherited From:
- Source:
- modal-dialog.js
Listens to Events:
- event:keydown
-
label()
-
Returns the label string for this modal. Primarily used for accessibility.
- Inherited From:
- Source:
- modal-dialog.js
Returns:
the localized or raw label of this modal.
- Type
- string
-
open()
-
Opens the modal.
- Inherited From:
- Source:
- modal-dialog.js
Fires:
Returns:
Returns itself; method can be chained.
- Type
- ModalDialog
-
opened( [value])
-
If the
ModalDialog
is currently open or closed.Parameters:
Name Type Argument Description value
boolean <optional>
If given, it will open (
true
) or close (false
) the modal.- Inherited From:
- Source:
- modal-dialog.js
Returns:
the current open state of the modaldialog
- Type
- boolean
Events
-
beforemodalclose
-
Fired just before a
ModalDialog
is closed.Type: EventTarget~Event
- Inherited From:
- Source:
- modal-dialog.js
-
beforemodalempty
-
Fired just before a
ModalDialog
is emptied.Type: EventTarget~Event
- Inherited From:
- Source:
- modal-dialog.js
-
beforemodalfill
-
Fired just before a
ModalDialog
is filled with content.Type: EventTarget~Event
- Inherited From:
- Source:
- modal-dialog.js
-
beforemodalopen
-
Fired just before a
ModalDialog
is opened.Type: EventTarget~Event
- Inherited From:
- Source:
- modal-dialog.js
-
modalclose
-
Fired just after a
ModalDialog
is closed.Type: EventTarget~Event
- Inherited From:
- Source:
- modal-dialog.js
-
modalempty
-
Fired just after a
ModalDialog
is emptied.Type: EventTarget~Event
- Inherited From:
- Source:
- modal-dialog.js
-
modalfill
-
Fired just after a
ModalDialog
is filled with content.Type: EventTarget~Event
- Inherited From:
- Source:
- modal-dialog.js
-
modalopen
-
Fired just after a
ModalDialog
is opened.Type: EventTarget~Event
- Inherited From:
- Source:
- modal-dialog.js