disableEvalJs().
When to use
- You need to prevent any JavaScript defined in the flow builder from running in your app.
- Your security policy or CSP restricts dynamic script execution.
- You want to reduce the attack surface of flows (e.g. in high‑security or locked‑down environments).
Requirements
- Call
disableEvalJs()beforeusertour.identify()(or any other call that starts showing flows). - Note that it has to be called on every page load to have an effect.
Parameters
None.Example
Notes
- Once disabled, any Evaluate JavaScript actions in your flows will not run. Buttons and triggers will still work; only the custom JS execution is disabled.
- This does not affect other flow behavior (navigation, dismiss, etc.).
- If you need this restriction on all pages, add the call in a shared bootstrap/entry script that runs before flow-related code on every load.