Some event handlers in emscripten are hardcoded to attach to `document` or `window`. Here's what needs to be patched to scope to the component: * [x] keydown/keypress/keyup, `JSEvents.registerOrRemoveHandler` -- Handles SDL key events in WASM * [x] keydown/keypress/keyup, `Module['keyboardListeningElement']` -- Used by `emscripten-core/emscripten/src/library_sdl.js` (in Fastcomp backend?) * [ ] keydown/keypress/keyup, `emscripten-core/emscripten/src/library_glfw.js` * Calls `window.addEventListener` directly
Some event handlers in emscripten are hardcoded to attach to
documentorwindow. Here's what needs to be patched to scope to the component:JSEvents.registerOrRemoveHandler-- Handles SDL key events in WASMModule['keyboardListeningElement']-- Used byemscripten-core/emscripten/src/library_sdl.js(in Fastcomp backend?)emscripten-core/emscripten/src/library_glfw.jswindow.addEventListenerdirectly