@lynx-js/web-core
Version:
This is an internal experimental package, do not use
41 lines (40 loc) • 2.34 kB
TypeScript
import type { Cloneable, InitI18nResources, JSRealm, MainThreadGlobalThis, NapiModulesMap, NativeModulesMap, PageConfig } from '../../types/index.js';
import { BackgroundThread } from './Background.js';
import { I18nManager } from './I18n.js';
import { WASMJSBinding } from './elementAPIs/WASMJSBinding.js';
import { ExposureServices } from './ExposureServices.js';
import type { LynxViewElement } from './LynxView.js';
export declare function createSystemInfo(browserConfig?: Record<string, any>): Record<string, any>;
export declare class LynxViewInstance implements AsyncDisposable {
#private;
readonly parentDom: LynxViewElement;
readonly initData: Cloneable;
readonly globalprops: Cloneable;
readonly templateUrl: string;
readonly rootDom: ShadowRoot;
readonly mtsRealm: JSRealm;
private isSSR;
private readonly transformVW;
private readonly transformVH;
private readonly transformREM;
readonly mainThreadGlobalThis: MainThreadGlobalThis;
readonly mtsWasmBinding: WASMJSBinding;
readonly backgroundThread: BackgroundThread;
readonly i18nManager: I18nManager;
readonly exposureServices: ExposureServices;
readonly webElementsLoadingPromises: Promise<void>[];
lepusCodeUrls: Map<string, Record<string, string>>;
systemInfo: Record<string, any>;
constructor(parentDom: LynxViewElement, initData: Cloneable, globalprops: Cloneable, templateUrl: string, rootDom: ShadowRoot, mtsRealm: JSRealm, isSSR: boolean, lynxGroupId: number | undefined, nativeModulesMap?: NativeModulesMap, napiModulesMap?: NapiModulesMap, initI18nResources?: InitI18nResources, transformVW?: boolean, transformVH?: boolean, transformREM?: boolean, browserConfig?: Record<string, any>);
onPageConfigReady(config: PageConfig): void;
onStyleInfoReady(currentUrl: string): void;
onMTSScriptsLoaded(currentUrl: string, isLazy: boolean): Promise<void>;
onMTSScriptsExecuted(): void;
onBTSScriptsLoaded(url: string): Promise<void>;
loadUnknownElement(tagName: string): void;
queryComponent(url: string): Promise<unknown>;
updateData(data: Cloneable, processorName?: string): Promise<void>;
updateGlobalProps(data: Cloneable): Promise<void>;
reportError(error: Error, release: string, fileName: string): void;
[Symbol.asyncDispose](): Promise<void>;
}