From bf199ccd7b45a77f021d3b414a5c380bd4c790e4 Mon Sep 17 00:00:00 2001 From: sanine Date: Sat, 6 Jul 2024 23:27:32 -0500 Subject: preload sfx --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.js') diff --git a/main.js b/main.js index 4ec64dc..44a0fe3 100644 --- a/main.js +++ b/main.js @@ -76,7 +76,7 @@ window.onload = () => setTimeout(() => { Promise.all([...Object.values(sfx)].map(x => new Promise(resolve => { x.load(); - x.addEventListener('canplaythrough', resolve); + x.addEventListener('canplaythrough', resolve, false); }))).then( () => setupLevelSelectUi(root, sfx) ); -- cgit v1.2.1