mach: wasm: Implement setShouldClose for wasm

This commit is contained in:
iddev5 2022-06-08 13:20:59 +05:30 committed by Stephen Gutekanst
parent 2d53b8bdfd
commit 772a821ce1
3 changed files with 17 additions and 3 deletions

View file

@ -274,6 +274,10 @@ const mach = {
return cv.canvas.height;
},
machEmitCloseEvent() {
window.dispatchEvent(new Event("mach-close"));
},
machEventShift() {
if (mach.events.length < 0)
return 0;