summaryrefslogtreecommitdiff
path: root/platform/web/js/engine/config.js
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-09-08 09:44:14 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-09-11 09:45:09 +0200
commit27f22b29f866d5cd807e70289ab771dabc79207c (patch)
tree552a7fa28a8078e44fb545f8ac6a459d32516bb8 /platform/web/js/engine/config.js
parentc658fa8b77eb701ddb504cba14fe2c966b7bb105 (diff)
[Web] Small fixes and enhancements.
- "Definitive" fix for ENOENT randomly disappearing from emscripten. - Proper shutdown when setup fails. - Re-enable WebGL explicit buffer swap. - Re-enable optional per-pixel transparency. - Add type cast to make closure compiler happy. - Remove emscripten Safari WebGL workaround. - Improve AudioWorklet cleanup.
Diffstat (limited to 'platform/web/js/engine/config.js')
-rw-r--r--platform/web/js/engine/config.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/web/js/engine/config.js b/platform/web/js/engine/config.js
index 9c4b6c2012..41be7b2512 100644
--- a/platform/web/js/engine/config.js
+++ b/platform/web/js/engine/config.js
@@ -317,7 +317,8 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-
if (!(this.canvas instanceof HTMLCanvasElement)) {
const nodes = document.getElementsByTagName('canvas');
if (nodes.length && nodes[0] instanceof HTMLCanvasElement) {
- this.canvas = nodes[0];
+ const first = nodes[0];
+ this.canvas = /** @type {!HTMLCanvasElement} */ (first);
}
if (!this.canvas) {
throw new Error('No canvas found in page');