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

The package publishes separate Intel and Apple Silicon targets. The WebviewJS CLI does not combine them into a universal binary; use external macOS tooling if you need to assemble and sign a universal distribution.

Threading requirement

macOS enforces that GUI operations run on the main thread. Create Application and BrowserWindow instances from the main thread. Do not create them from a worker_threads Worker or move these calls to another thread through an async design.

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.