Actions reference
Browse the built-in actions in Nordcraft. Actions in Nordcraft are reusable JavaScript functions that allow you to extend the platform's functionality. Actions are available in workflows and event callbacks.
To learn more about actions, check out the actions overview.
Clear Local Storage
Deletes all values in local storage.
Clear Session Storage
Deletes all values in session storage.
Copy to clipboard
Arguments
Name | Type | Description |
---|---|---|
Value | String |
Delete from Local Storage
Deletes the value from local storage (if found) based on the provided key.
Arguments
Name | Type | Description |
---|---|---|
Key | The key to use when deleting in local storage. |
Delete from Session Storage
Deletes the value from session storage (if found) based on the provided key.
Arguments
Name | Type | Description |
---|---|---|
Key | The key to use when deleting in session storage. |
Focus
Move focus to a DOM element.
Arguments
Name | Type | Description |
---|---|---|
Element | Element | The DOM element that should receive focus. |
Go to URL
Navigate to a specified URL.
Arguments
Name | Type | Description |
---|---|---|
URL |
Interval
Run an action every "delay" milliseconds.
Arguments
Name | Type | Description |
---|---|---|
Interval in milliseconds | Number |
Log to console
Log a message to the browser console.
Arguments
Name | Type | Description |
---|---|---|
Label | ||
Data |
Prevent default
Prevent default browser behavior for this event.
Save to Local Storage
Save a provided key/value to local storage by JSON encoding the value.
Arguments
Name | Type | Description |
---|---|---|
Key | The key to be used in local storage. | |
Value | Any | The value that should be saved in local storage. This can be anything that is serializable (String, Number, Boolean, Array or Object). |
Save to Session Storage
Save a provided key/value to session storage by JSON encoding the value.
Arguments
Name | Type | Description |
---|---|---|
Key | The key to be used in session storage. | |
Value | Any | The value that should be saved in session storage. This can be anything that is serializable (String, Number, Boolean, Array or Object). |
Arguments
Name | Type | Description |
---|---|---|
Access token | Access tokens are the most common way to authenticate with a server. | |
Expires in | Number | (Optional) Time in seconds until the token expires. Defaults to 3600 (1 hour). This should be left blank for JWTs. |
Arguments
Name | Type | Description |
---|---|---|
URL to share | String | |
Title to share | String | |
Text to share | String |
Sleep
Run an action after a delay.
Arguments
Name | Type | Description |
---|---|---|
Delay in milliseconds | Number |
Stop propagation
Stop the event from bubbling up the DOM to parent elements.