Skip to content

Commit 232caeb

Browse files
authored
Update 1.fill-a-form-with-barcode-reading.html
1 parent ed95e2c commit 232caeb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

4.use-case/1.fill-a-form-with-barcode-reading.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h3>Click each input box to fill in!</h3>
4040

4141
// scanner for decoding video
4242
let pScanner = null;
43-
window.onload = async function() {
43+
(async function() {
4444
let allInputs = document.getElementsByClassName('latest-result');
4545
for (let input of allInputs)
4646
input.addEventListener('click', async function() {
@@ -93,7 +93,7 @@ <h3>Click each input box to fill in!</h3>
9393
}
9494
document.getElementById('inputs').hidden = false;
9595
document.getElementById('lib-load').hidden = true;
96-
};
96+
})();
9797
</script>
9898
<div id="UIElement" style="width:100%;height:100%;min-width:100px;min-height:100px;background:#eee;" hidden>
9999
<svg class="dce-bg-loading" style="display:none;animation:1s linear infinite dce-rotate;width:40%;height:40%;position:absolute;margin:auto;left:0;top:0;right:0;bottom:0;fill:#aaa;" viewBox="0 0 1792 1792">
@@ -155,4 +155,4 @@ <h3>Click each input box to fill in!</h3>
155155
}
156156
</style>
157157

158-
</html>
158+
</html>

0 commit comments

Comments
 (0)