Lynx

LynxEnv

LynxEnv

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);
No matching API found:
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.