mirror of
https://github.com/raysan5/raylib.git
synced 2026-04-12 10:09:09 -04:00
[web] Fix Emscripten's Closure compiler error: undeclared canvas variable (#5507)
* Fix Emscripten Closure compiler error: undeclared canvas variable * Fix hardcoded canvas IDs in web targets
This commit is contained in:
@ -280,15 +280,16 @@ void ToggleBorderlessWindowed(void)
|
||||
// 2. The style unset handles the possibility of a width="value%" like on the default shell.html file
|
||||
EM_ASM
|
||||
(
|
||||
const canvasId = UTF8ToString($0);
|
||||
setTimeout(function()
|
||||
{
|
||||
Module.requestFullscreen(false, true);
|
||||
setTimeout(function()
|
||||
{
|
||||
canvas.style.width="unset";
|
||||
document.querySelector(canvasId).style.width="unset";
|
||||
}, 100);
|
||||
}, 100);
|
||||
);
|
||||
, platform.canvasId);
|
||||
FLAG_SET(CORE.Window.flags, FLAG_BORDERLESS_WINDOWED_MODE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user