Skip to main content
WebviewJS on macOS uses the built-in WebKit engine (WKWebView) — the same engine that powers Safari. No additional runtime installation is needed; WebKit is part of the operating system. macOS 10.15 Catalina or later is required.

Supported architectures

Universal binaries (fat binaries targeting both slices) can be produced during the build step. See the Building Executables guide for details.

Threading requirement

macOS enforces that all GUI operations run on the main thread. Do not create Application or BrowserWindow from a worker_threads Worker or any async context that migrates the call off the main thread. WebviewJS handles main-thread dispatch internally, but the initial construction calls must originate from the main thread.

macOS-specific creation options

Pass these fields in BrowserWindowOptions when calling app.createBrowserWindow(). They are silently ignored on other platforms.

macOS runtime methods

Simple fullscreen (pre-Lion style)

macOS introduced a slide-in fullscreen mode in Lion (10.7). The older “simple” fullscreen expands the window to fill the screen without a separate Space:
Use win.setFullscreen(FullscreenType.Borderless) for the modern macOS fullscreen Space instead.

Window shadow

Native window tabs

macOS can merge multiple windows of the same app into a tab bar when they share a tabbing identifier:

Document edited state

Set the document-edited flag to display the standard macOS dot in the close button, signalling unsaved changes:
On macOS the menu bar is a single, application-level bar that spans the top of the screen — it belongs to the app, not to any individual window. Set it via app.setMenu():
The application-level menu is ready as soon as app.setMenu() returns.

macOS-specific menu roles

All predefined roles work on macOS. The following roles are macOS-exclusive:

System tray

WebviewJS supports macOS template icons — monochrome images that the system automatically adapts to the current Dark or Light menu bar appearance:
Template icons should be black (or black with alpha). The system handles colour inversion for Dark Mode — you do not need to supply separate assets.