mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 13:00:28 +00:00
Use .shift() instead
This commit is contained in:
5
vendor/wasm/js/runtime.js
vendored
5
vendor/wasm/js/runtime.js
vendored
@@ -1844,13 +1844,12 @@ async function runWasm(wasmPath, consoleElement, extraForeignImports, wasmMemory
|
||||
const dt = (currTimeStamp - prevTimeStamp)*0.001;
|
||||
prevTimeStamp = currTimeStamp;
|
||||
|
||||
for (let i = 0; i < eventQueue.length; i++) {
|
||||
let e = eventQueue[i];
|
||||
while (eventQueue.length > 0) {
|
||||
let e = eventQueue.shift()
|
||||
event_temp.data = e.event_data;
|
||||
exports.odin_dom_do_event_callback(e.data, e.callback, odin_ctx);
|
||||
}
|
||||
event_temp.data = null;
|
||||
eventQueue.length = 0;
|
||||
|
||||
if (!exports.step(currTimeStamp*0.001, odin_ctx)) {
|
||||
exports._end();
|
||||
|
||||
Reference in New Issue
Block a user