new ErrorDisplay(player, optionsopt)
Creates an instance of this class.
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
player | 
            
            Player | The   | 
        |
options | 
            
            Object | 
                
                    <optional> | 
            
            
            The key/value store of player options.  | 
        
Extends
Methods
- 
    
        
buildCSSClass() → {string}
 - 
    
    
Builds the default DOM
className.Returns:
string -The DOM
classNamefor this object.- Overrides:
 - Deprecated:
 - Since version 5.
 
 - 
    
        
close()
 - 
    
    
Closes the modal, does nothing if the
ModalDialogis not open.Fires:
- Inherited From:
 
 - 
    
        
closeable(valueopt) → {boolean}
 - 
    
    
Check to see if the
ModalDialogis closeable via the UI.Parameters:
Name Type Attributes Description valueboolean <optional> 
If given as a boolean, it will set the
closeableoption.Returns:
boolean -Returns the final value of the closable option.
- Inherited From:
 
 - 
    
        
content() → {string}
 - 
    
    
Gets the localized error message based on the
Players error.Returns:
string -The
Players error message localized or an empty string.- Overrides:
 
 - 
    
        
createEl() → {Element}
 - 
    
    
Create the
ModalDialog's DOM elementReturns:
Element -The DOM element that gets created.
- Inherited From:
 
 - 
    
        
description() → {string}
 - 
    
    
Returns the description string for this modal. Primarily used for accessibility.
Returns:
string -The localized or raw description of this modal.
- Inherited From:
 
 - 
    
        
empty()
 - 
    
    
Empties the content element. This happens anytime the modal is filled.
Fires:
- Inherited From:
 
 - 
    
        
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:
 
 - 
    
        
fillWith(contentopt)
 - 
    
    
Fill the modal's content element with arbitrary content. The content element will be emptied before this change takes place.
Parameters:
Name Type Attributes Description contentMixed <optional> 
The same rules apply to this as apply to the
contentoption.Fires:
- Inherited From:
 
 - 
    
        
handleKeyDown()
 - 
    
    
Keydown handler. Attached when modal is focused.
Listens to Events:
- event:keydown
 
- Inherited From:
 
 - 
    
        
handleKeyPress(e)
 - 
    
    
Handles
keydownevents on the document, looking for ESC, which closes the modal.Parameters:
Name Type Description eEventTarget~Event The keypress that triggered this event.
Listens to Events:
- event:keydown
 
- Inherited From:
 
 - 
    
        
label() → {string}
 - 
    
    
Returns the label string for this modal. Primarily used for accessibility.
Returns:
string -the localized or raw label of this modal.
- Inherited From:
 
 - 
    
        
open()
 - 
    
    
Opens the modal.
Fires:
- Inherited From:
 
 - 
    
        
opened(valueopt) → {boolean}
 - 
    
    
If the
ModalDialogis currently open or closed.Parameters:
Name Type Attributes Description valueboolean <optional> 
If given, it will open (
true) or close (false) the modal.Returns:
boolean -the current open state of the modaldialog
- Inherited From:
 
 
Events
- 
    
        
beforemodalclose
 - 
    
    
Fired just before a
ModalDialogis closed.Type:
- Inherited From:
 
 - 
    
        
beforemodalempty
 - 
    
    
Fired just before a
ModalDialogis emptied.Type:
- Inherited From:
 
 - 
    
        
beforemodalfill
 - 
    
    
Fired just before a
ModalDialogis filled with content.Type:
- Inherited From:
 
 - 
    
        
beforemodalopen
 - 
    
    
Fired just before a
ModalDialogis opened.Type:
- Inherited From:
 
 - 
    
        
modalclose
 - 
    
    
Fired just after a
ModalDialogis closed.Type:
- Inherited From:
 
 - 
    
        
modalempty
 - 
    
    
Fired just after a
ModalDialogis emptied.Type:
- Inherited From:
 
 - 
    
        
modalfill
 - 
    
    
Fired just after a
ModalDialogis filled with content.Type:
- Inherited From:
 
 - 
    
        
modalopen
 - 
    
    
Fired just after a
ModalDialogis opened.Type:
- Inherited From: