webflow.isMode()Returns a boolean that shows whether the Designer is currently in the specified mode.
Use this method when you need to branch on a single mode and don’t need the full list of modes.
To read the current mode directly, use webflow.getCurrentMode().
mode: AppModeName
The mode to check for.
One of "design", "build", "preview", "edit", or "comment".
See webflow.getCurrentMode() for the full list of modes and what each one represents.
Promise<boolean>
A Promise that resolves to true when the Designer is in the specified mode, or false otherwise.
Block an action and notify the user when the Designer is in the wrong mode for the operation: