()
| 490 | } |
| 491 | |
| 492 | async function ensureNativeLoaded(): Promise<NativeApi> { |
| 493 | if (native !== null) return native; |
| 494 | if (nativePromise !== null) return nativePromise; |
| 495 | nativePromise = loadNative(opts.nativeShimModule).then((mod) => { |
| 496 | native = mod; |
| 497 | return mod; |
| 498 | }); |
| 499 | return nativePromise; |
| 500 | } |
| 501 | |
| 502 | function ensureDebugApiLoaded(api: NativeApi): NativeApiWithDebug { |
| 503 | if (typeof api.engineDebugEnable !== "function") { |