@lynx-js/cef-webview
@lynx-js/cef-webview is the officially maintained Lynxtron native library that
provides the CEF-backed <webview> element.
It ships platform-specific Lynxtron native artifacts and a ./lynxtron entry
that loads the current platform artifact so its static Lynx registrations run in
the host process.
For the matching AutoLink tooling and automatic packaging setup, see the webview setup guide.
Install
Host Entry
Import the Lynxtron entry in the main process before creating a LynxWindow or
loading a Lynx bundle:
The initialize() method initializes Chromium Embedded Framework (CEF) for the
current process. AutoLink also uses the ./lynxtron entry when staging the
package for a Lynxtron host build.
Initialization Result and Process Limit
initialize(): boolean returns true on success and throws when native initialization fails. Do not continue creating WebViews after a failure; inspect the native logs for the cause.
CEF selects its storage directory based on the host application's identity. Multiple instances sharing the same identity may encounter storage conflicts. One host can create multiple WebViews. A storage conflict is one possible initialization failure, not the only cause.
The root and ./lynxtron exports include TypeScript declarations for this host API.
Exports
Package Metadata
The package includes lynx.lib.json with Lynxtron metadata. The following
excerpt abbreviates the complete platform matrix and Windows runtime file list:
files lists payloads that remain together in the installed package.
frameworks and appBundles list macOS bundles that the builder places in
Contents/Frameworks; nested applications are also included in the host's
signing flow.
For the end-to-end setup flow, see Using webview in Lynxtron.