Shows and hides messages to the user.
- Source:
Methods
(static) getHtmlElement(messageType) → {HTMLElement}
- Source:
Returns the message element by the given message type.
Parameters:
Name | Type | Description |
---|---|---|
messageType |
int | string |
Returns:
- Type
- HTMLElement
(static) setGlobalHook(hookType, hookFunction) → {void}
- Source:
Add a global hook that is triggered for all messages.
Parameters:
Name | Type | Description |
---|---|---|
hookType |
string | |
hookFunction |
function | null | the callback to run |
Throws:
-
if invalid hook type is used
- Type
- TypeError | Error
Returns:
- Type
- void
(static) setHook(messageType, hookType, hookFunction) → {void}
- Source:
Let's other functions set a hook to be called when a message type is shown or hidden.
Set parameters to null or undefined (i.e. do not set) in order to disable the hook. The errorShown function gets one parameter: The arguments passed to the function, as an array.
Pass "null" to it to unset it.
Parameters:
Name | Type | Description |
---|---|---|
messageType |
MESSAGE_LEVEL | HTMLElement | |
hookType |
string | |
hookFunction |
function | null | the callback to run |
Throws:
-
if invalid hook type is used
- Type
- TypeError | Error
Returns:
- Type
- void