Learn how to execute JavaScript code within your project using the Run Script block in Release0. This guide covers key features, limitations, and examples for effective usage.
Note: Useconsole.log({{My variable}})
instead ofconsole.log("{{My variable}}")
.
setVariable
FunctionsetVariable
function allows you to set values within a Script block.
Important:
- The
setVariable
function is only available in scripts executed on the server.- It will not work if the Execute on client? option is checked.
console.log
, setTimeout
, and setInterval
are not available.import
or require
is not supported.window
, document
, and localStorage
are not accessible.fetch
function differs from the native implementation:
response
will always be a string, even if the server returns a JSON object.JSON.parse()
.Note: Avoid usingawait response.text()
orawait response.json()
.