Skip to content

Inline JS

The inline JS action runs the code provided using the JS Engine plugin.

interface InlineJsButtonAction {
type: 'inlineJS';
code: string; // the code to run
}

The button configuration is available as a read only variable in the script as context.buttonConfig. Aditional information about the button is available in the context.buttonContext object. See Button Context for more information.

Example

This button will log Hello World! to the console.

```meta-bind-button
style: primary
label: Greet the World
action:
type: inlineJS
code: "console.log('Hello World!');"
```