You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
[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.
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user