Load the Cesium SDK and its widget styles only when a Cesium globe or a feature that needs it first runs

index.html no longer loads /cesium/Cesium.js and widgets.css: the Cesium scene loads both before it builds its viewer. A cold Navara start requests nothing of the Cesium library again, and qa-strict-cold-chunks asserts that without the known-gap allowance. The strict harness puts an accessor in place of the Cesium global on every page and fails a scenario that reads it before Cesium.js has run; GEV_QA_CESIUM_TRAP=record lists every such read site instead.
This commit is contained in:
German Khokhlov committed 2026-11-04 17:15:27 +04:00
1 parent b8305de14b
commit f89aee1eac
4 files changed
+93 -26

No files matched your search

+3
View File
@@ -17,6 +17,7 @@ import {
import { describeError } from './errors.js';
import { createSceneEngine } from './globeEngine.js';
import { onLocaleChange, t } from '../i18n/index.js';
import { loadCesium } from './loadCesium.js';
/**
* Construct the application globe using the caller's local configuration.
@@ -139,6 +140,8 @@ async function createRenderer({
}
if (engineKind !== 'cesium')
throw new TypeError(`Unknown globe engine: ${engineKind}`);
await loadCesium();
signal.throwIfAborted();
loaderStatus.textContent = t('Configuring viewer...');
// Provider attribution stays visible, including clean-view and recording.
const creditContainer = document.createElement('div');