WebviewJS on macOS delegates rendering to the system’s built-in WebKit (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/webviewjs/webview/llms.txt
Use this file to discover all available pages before exploring further.
WKWebView), so no additional runtime installation is required and your users always get the WebKit version their OS provides. The library wraps Tao’s macOS-specific window extensions to expose native features like transparent titlebars, full-size content views, native window tabs, simple fullscreen mode, and the document-edited indicator — all available as first-class JavaScript APIs.
WebKit and System Requirements
macOS 10.15 Catalina or later is required. WebKit is bundled with the OS; your application ships zero renderer code. The currently-loaded WebKit version is returned bygetWebviewVersion():
Main-Thread Requirement
macOS enforces that all GUI operations happen on the main thread. WebviewJS handles this automatically — but you must not createApplication or BrowserWindow from a worker_threads Worker or any async context that migrates execution off the main thread.
App-Level Menu Bar
On macOS the menu bar spans the top of the entire screen and is owned by the application, not any individual window. Useapp.setMenu() to set it:
Standard macOS Roles
All predefined menu roles work on macOS:| Role | Default shortcut |
|---|---|
hide | ⌘H |
hideothers | ⌥⌘H |
showall | — |
bringalltofront | — |
services | Services submenu |
quit | ⌘Q |
about | — |
On macOS the menu bar is global —
win.setMenu() on a per-window basis is silently ignored. Use app.setMenu() exclusively.macOS-Specific Window Options
BrowserWindowOptions exposes a rich set of macOS-only fields that map onto Tao’s WindowBuilderExtMacOS trait:
Option Reference
| Option | Type | Description |
|---|---|---|
macosMovableByWindowBackground | boolean | Drag the window by clicking its background |
macosTitlebarTransparent | boolean | Transparent titlebar background |
macosTitleHidden | boolean | Hide the title text (traffic lights remain) |
macosTitlebarHidden | boolean | Hide the full titlebar including buttons |
macosTitlebarButtonsHidden | boolean | Hide close/minimise/maximise buttons only |
macosFullsizeContentView | boolean | Extend content view under the titlebar |
macosDisallowHidpi | boolean | Force 1× scale; disables Retina rendering |
macosHasShadow | boolean | Initial drop-shadow state |
macosTabbingIdentifier | string | Native tab group identifier |
Transparent Windows
Combinetransparent, decorations, and a transparent webview background for a fully see-through, frameless window:
Simple Fullscreen
macOS has two fullscreen modes. The standard mode (FullscreenType.Borderless) uses the native macOS fullscreen space and slides between Spaces. “Simple fullscreen” is the older mode (pre-10.7 style) that maximises the window within the current desktop without creating a new Space:
Window Shadow
Native Window Tabs
macOS supports grouping multiple windows into a single tabbed window using a tabbing identifier. Windows with the same identifier may be merged into one tab group by the user or programmatically:Document Edited Indicator
macOS shows a small dot in the close button when a document has unsaved changes. Toggle it withsetDocumentEdited():
Fullscreen
Known Limitations
setSkipTaskbar is a no-op
setSkipTaskbar is a no-op
win.setSkipTaskbar(true) does nothing on macOS. To hide your app from the Dock you must set NSApplication.setActivationPolicy to .accessory or .prohibited, which requires an App Sandbox entitlement and is outside the scope of the WebviewJS API.Window icons are not shown in the Dock
Window icons are not shown in the Dock
macOS determines the Dock icon from the app bundle’s
Info.plist. Setting a window icon via win.setWindowIcon() has no effect on the Dock tile.Click-through support
Click-through support
win.setIgnoreCursorEvents(true) is supported via NSWindow.setIgnoresMouseEvents(_:). The window will pass all mouse events through to whatever is behind it.