WebviewJS on Windows is powered by WebView2, Microsoft’s Chromium-based embedding engine, which means your users get a modern, evergreen browser runtime without shipping a full browser bundle. The engine integrates tightly with the Win32 windowing layer through Tao, giving you native DPI awareness, taskbar badge support, and per-window content protection — all exposed through a clean JavaScript API.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.
WebView2 Runtime
WebView2 is the rendering engine WebviewJS uses on Windows. It ships pre-installed on Windows 11 and is automatically downloaded and installed the first time it is needed on Windows 10. For enterprise or offline deployments you can pre-install it using Microsoft’s Evergreen bootstrapper.Windows 11
WebView2 runtime ships pre-installed with the OS. No additional setup required.
Windows 10
The runtime is auto-downloaded on first use. You may also pre-install it via the Evergreen bootstrapper.
Windows-Specific Window Options
BrowserWindowOptions includes several Windows-only fields that map directly onto the underlying Win32/Tao builder:
Option Reference
| Option | Type | Description |
|---|---|---|
windowsOwnerWindow | bigint | HWND of the owner window for modal/popup positioning |
windowsTaskbarIcon | TrayIconImage | Custom icon shown in the taskbar button |
windowsNoRedirectionBitmap | boolean | Disables the DirectComposition redirection bitmap |
windowsDragAndDrop | boolean | Enables OLE drag-and-drop message handling |
windowsSkipTaskbar | boolean | Hides the window from the taskbar |
windowsClassName | string | Custom Win32 window class name |
windowsUndecoratedShadow | boolean | Renders a drop-shadow on borderless windows |
DPI and Scale Factor
Tao is DPI-aware and reports the monitor’s scale factor automatically. Usewin.scaleFactor() to get the current ratio, and always work in logical pixels when positioning child elements or calculating layout:
Pass
logical: true to BrowserWindowOptions or setSize() / setPosition() to work in logical pixels. Physical pixels are the default.Taskbar Icons
You can set or remove a dedicated taskbar icon independently of the window’s title-bar icon:Uint8Array / Buffer pixel data. You may also supply explicit width and height if the buffer contains raw RGBA bytes rather than an encoded image:
Progress Bar
WebviewJS exposes WebView2’s taskbar progress overlay throughsetProgressBar(). Pass a JsProgressBar object with an optional state and a progress value (0–100):
ProgressBarState Values
| State | Description |
|---|---|
None | Removes the progress overlay |
Normal | Green progress bar at progress % |
Indeterminate | Animated spinner (ignores progress) |
Paused | Yellow/paused bar |
Error | Red error indicator |
Content Protection
Prevent window contents from appearing in screenshots, screen recordings, or the Windows task switcher:IPC and Custom Protocols
Always serve pages that use IPC orwebview.expose() via a custom protocol rather than file: URLs. Register a custom protocol through the BrowserWindow low-level API and then load content from it:
Menu Bar
On Windows the menu bar is attached to each window’s title bar (standard Win32 behaviour). Each window can carry its own menu, or inherit the global one set viaapp.setMenu():
Undecorated Windows and Shadows
Whendecorations: false is set, Windows will strip the title bar but also removes the drop shadow by default. Re-enable it with windowsUndecoratedShadow: