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 storageView on GitHub
Delete all values in local storage.
Clear session storageView on GitHub
Delete all values in session storage.
Copy to clipboardView on GitHub
Copy contents to the clipboard.
Arguments
| Name | Type | Description |
|---|---|---|
| Value | String | The value you want to copy. |
Delete from local storageView on GitHub
Delete a value from local storage (if found) based on the provided key.
Arguments
| Name | Type | Description |
|---|---|---|
| Key | String | The key in local storage to delete. |
Delete from session storageView on GitHub
Delete a value from session storage (if found) based on the provided key.
Arguments
| Name | Type | Description |
|---|---|---|
| Key | String | The key in session storage to delete. |
FocusView on GitHub
Move focus to a DOM element.
Arguments
| Name | Type | Description |
|---|---|---|
| Element | Element | The DOM element that should receive focus. |
Go to URLView on GitHub
Navigate to a specified URL.
Arguments
| Name | Type | Description |
|---|---|---|
| URL | String | The URL to navigate to. |
IntervalView on GitHub
Run an action every "delay" milliseconds.
Arguments
| Name | Type | Description |
|---|---|---|
| Interval in milliseconds | Number | The interval "delay". |
Log to consoleView on GitHub
Log a message to the browser console.
Arguments
| Name | Type | Description |
|---|---|---|
| Label | This is text | A label for the message. |
| Data | Any | The data you want to log to the console. |
Prevent defaultView on GitHub
Prevent default browser behavior for this event.
Save to local storageView on GitHub
Save a provided key/value to local storage by JSON encoding the value.
Arguments
| Name | Type | Description |
|---|---|---|
| Key | String | 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 storageView on GitHub
Save a provided key/value to session storage by JSON encoding the value.
Arguments
| Name | Type | Description |
|---|---|---|
| Key | String | 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). |
Set themeView on GitHub
Sets the application theme. Call with null to reset. This action automatically sets a theme-cookie so the theme persists across sessions. Note: This action is currently only supported when the "style-variables-v2" feature flag is enabled.
Arguments
| Name | Type | Description |
|---|---|---|
| Name | String | The name of the theme. |
SleepView on GitHub
Run an action after a delay.
Arguments
| Name | Type | Description |
|---|---|---|
| Delay in milliseconds | Number | The number of milliseconds to wait before an action is executed. |
Stop propagationView on GitHub
Stop the event from bubbling up the DOM to parent elements.