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/api/lynx-native-api/lynx-env.md.
Lynx
  • English
  • LynxEnv Desktop

    LynxEnv Desktop

    LynxEnv is the process-level environment entry for Desktop public API. It exposes SDK information, DevTool switches, LogBox switches, and module registration for native and extension modules.

    Desktop (C++)

    lynx::pub::LynxEnv& env = lynx::pub::LynxEnv::GetInstance();
    const char* version = env.GetVersion();
    env.SetDevtoolAppInfo("app_id", "demo");
    env.SetDevtoolEnabled(true);
    bool devtool_enabled = env.IsDevtoolEnabled();
    bool connected = env.ConnectDevtool("ws://127.0.0.1:9229");
    env.SetLogboxEnabled(true);
    bool logbox_enabled = env.IsLogboxEnabled();
    env.RegisterNativeModule("DemoModule", creator, opaque);
    env.RegisterExtensionModule("DemoExtension", extension_creator, true, opaque);

    LynxEnv

    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.