Constructor
new Message(messageWrapper) → {Drupal.Message~messageDefinition}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
messageWrapper |
HTMLElement | The zone where to add messages. If no element is provided an attempt is made to determine a default location. |
Returns:
Class to add and remove messages.
Methods
(static) announce(message, options)
- Source:
Helper to call Drupal.announce() with the right parameters.
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
message |
string | Displayed message. | ||||||||||||||||
options |
object | Additional data.
Properties
|
(static) defaultWrapper() → {HTMLElement}
- Source:
Attempt to determine the default location for
inserting JavaScript messages or create one if needed.
Returns:
The default destination for JavaScript messages.
- Type
- HTMLElement
(static) getMessageTypeLabels() → {Object}
- Source:
Provide an object containing the available message types.
Returns:
An object containing message type strings.
- Type
- Object
(static) messageInternalWrapper(messageWrapper) → {HTMLElement}
- Source:
Function for creating the internal message wrapper element.
Parameters:
Name | Type | Description |
---|---|---|
messageWrapper |
HTMLElement | The message wrapper. |
Returns:
The internal wrapper DOM element.
- Type
- HTMLElement
Type Definitions
messageDefinition
- Source:
Type:
- class