Search.../

viewMode

Gets which mode the site is currently being viewed in.

Description

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.

Type:

stringRead Only

Was this helpful?

Get a window's view mode

Copy Code
1import wixWindowFrontend from 'wix-window-frontend';
2
3// ...
4
5let viewMode = wixWindowFrontend.viewMode; // "Site"