viewMode( )


Gets which mode the site is currently being viewed in.

The viewMode property gets either:

  • "Preview": When previewing the site using the Preview button in the editor.
  • "Site": When viewing the published site.
  • "Editor": When viewing a Wix Blocks built widget in the editor.
Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:Promise<string>
Did this help?