-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
Please include the following in your bug report:
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 4.0.14 (96371ed)
clang version 22.0.0git (https:/github.com/llvm/llvm-project 1cc84bcc08f723a6ba9d845c3fed1777547f45f9)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /root/emsdk/upstream/bin
JS Console Error
Aborted('requestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ))
overrideMethod @ hook.js:608
emscript.js:704 Uncaught RuntimeError: Aborted('requestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ))
at abort (emscript.js:699:11)
at Object.get (emscript.js:556:9)
at HTMLInputElement.onclick (emscript.html:115:132)
hook.js:608 user callback triggered after runtime exited or application aborted. Ignoring.
Fix
I have found out that changing:
<input type="button" value="Fullscreen" onclick="Module.requestFullscreen(document.getElementById('pointerLock').checked,
document.getElementById('resize').checked)">
To
<input type="button" value="Fullscreen" onclick="Module.canvas.requestFullscreen(document.getElementById('pointerLock').checked,
document.getElementById('resize').checked)">
fixes atleast my issue.
OBS: I am not to experienced, and it may just be a user error. Anyway feels like something that should be reported. :P