For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/lynxtron/api/@lynx-js/cef-webview/index.md.
  • English
  • @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.

    Install

    npm
    yarn
    pnpm
    bun
    deno
    npm install @lynx-js/cef-webview

    Host Entry

    Import the Lynxtron entry in the main process before creating a LynxWindow or loading a Lynx bundle:

    import cefWebview from '@lynx-js/cef-webview/lynxtron';
    
    cefWebview.initialize();

    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.

    Exports

    ExportDescription
    .CommonJS package entry.
    ./lynxtronLynxtron host entry that loads the current platform native binary.
    ./package.jsonPackage metadata.

    Package Metadata

    The package includes lynx.lib.json with Lynxtron metadata:

    {
      "platforms": {
        "lynxtron": {
          "path": "dist"
        }
      }
    }

    For the end-to-end setup flow, see Using webview in Lynxtron.

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.