webview

Windows

WebView2 runtime

WebviewJS on Windows uses the WebView2 engine (Chromium-based).

Check the installed version at runtime:

import { getWebviewVersion } from '@webviewjs/webview';
console.log(getWebviewVersion()); // e.g. "128.0.2739.42"

The menu bar is attached to each window’s title bar (standard Win32 behaviour). Each window can have its own menu or share the global one set via app.setMenu().

DPI / HiDPI

winit advertises the monitor’s scale factor and scales the window accordingly. Use win.scaleFactor() to get the current DPI ratio, and logical pixels when positioning child elements.

Taskbar integration

// Hide from taskbar (e.g. for system-tray apps)
win.setSkipTaskbar(true);

// Progress ring in the taskbar icon
win.setProgressBar({ state: ProgressBarState.Normal, progress: 42 });

The complete winit Windows extension surface is exposed on BrowserWindow, including taskbar icons, system backdrops, title and border colors, corner preferences, undecorated shadows, enabled state, and the any-thread native handle. See Windows extensions.

The acrylic example uses WindowsSystemBackdrop.TransientWindow with a transparent native window and transparent webview. System backdrops require Windows 11 build 22523 or newer.

Content protection

Prevents the window contents from appearing in screenshots or screen-recording APIs:

win.setContentProtection(true);

Known limitations