Skip to content

Commit

Permalink
Gallery wasm demo: Call loadGallery() once on window load
Browse files Browse the repository at this point in the history
  • Loading branch information
aurindam committed Sep 22, 2023
1 parent 57ac24e commit f2652d9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/gallery/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ <h1>Slint Gallery</h1>
}

styleSelection.onchange = loadGallery;
loadGallery()

window.addEventListener('load', () => {
let url = document.location.href;
Expand All @@ -90,10 +89,10 @@ <h1>Slint Gallery</h1>
val = data.style.split(',');
for (let i = 0, l = val.length; i < l; i++) {
document.getElementById('style-selection').value = val[i];
loadGallery();
break;
}
}
loadGallery();
}, false);
</script>
</body>
Expand Down

0 comments on commit f2652d9

Please sign in to comment.