- Source:
Methods
get_language() → {string}
Get the user's currently selected language code for the package. Returns "" if no localisation is defined for the package.
- Source:
Returns:
language code (eg "jp") for selected localisation or ""
- Type
- string
localise_body()
attempt to localise all text found within the document's body which contains strings of the form "{{}}"
- Source:
localise_string(input) → {string}
localise a string using the package's localisation bundles and the user's currently selected language
Parameters:
| Name | Type | Description |
|---|---|---|
input |
string | an input string to be localised |
- Source:
Returns:
return the localised string, or the input string if no localisation was performed
- Type
- string
send_message(…message_parts)
send a message to the node or configuration
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
message_parts |
string | ArrayBuffer | JSONSerialisable |
<repeatable> |
- Source:
set_connection_handler(handler)
set a handler that is called when the page is connected to the node or configuration with which it is associated
this handler will be called shortly after the page is loaded
Parameters:
| Name | Type | Description |
|---|---|---|
handler |
skadi.PageInterface.connectedCallback |
- Source:
set_message_handler(handler)
set a handler that is called when a message is received from the node or configuration
Parameters:
| Name | Type | Description |
|---|---|---|
handler |
skadi.PageInterface.messageReceivedCallback |
- Source:
Type Definitions
connectedCallback()
A callback that is called when a connection is established between the page and the node or configuration with which it is associated
- Source:
messageReceivedCallback(…@param)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
@param |
string | ArrayBuffer | JSONSerialisable |
<repeatable> |
the message received, may be in multiple parts |
- Source: