搜索文档
Home > @lynx-js/test-environment > LynxEnv > backgroundThread
The global object for the background thread.
Signature:
backgroundThread: LynxGlobalThis;
import { LynxEnv } from '@lynx-js/test-environment'; const lynxEnv = new LynxEnv(); lynxEnv.switchToBackgroundThread(); // use the background thread global object globalThis.lynxCoreInject.tt.OnLifecycleEvent(...args);