mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix scroll and visibilitychange event handling
This commit is contained in:
Vendored
+5
-5
@@ -1451,11 +1451,11 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement) {
|
|||||||
wmi.storeF64(off(8), e.deltaY);
|
wmi.storeF64(off(8), e.deltaY);
|
||||||
wmi.storeF64(off(8), e.deltaZ);
|
wmi.storeF64(off(8), e.deltaZ);
|
||||||
wmi.storeU32(off(4), e.deltaMode);
|
wmi.storeU32(off(4), e.deltaMode);
|
||||||
} else if (e instanceof Event) {
|
} else if (e.type === 'scroll') {
|
||||||
if ('scrollX' in e) {
|
wmi.storeF64(off(8), window.scrollX);
|
||||||
wmi.storeF64(off(8), e.scrollX);
|
wmi.storeF64(off(8), window.scrollY);
|
||||||
wmi.storeF64(off(8), e.scrollY);
|
} else if (e.type === 'visibilitychange') {
|
||||||
}
|
wmi.storeU8(off(1), !document.hidden);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user