Skip to content

Commit 2ec6b39

Browse files
authored
Update 12.read-video-es6.html
1 parent 7b65029 commit 2ec6b39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

1.hello-world/12.read-video-es6.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h1 style="font-size: 1.5em;">Hello World for ES6</h1>
3030
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.1/dist/";
3131

3232
let pScanner = null;
33-
window.onload = async () => {
33+
(async () => {
3434
try {
3535
const scanner = await (pScanner = pScanner || BarcodeScanner.createInstance());
3636
/*
@@ -57,8 +57,8 @@ <h1 style="font-size: 1.5em;">Hello World for ES6</h1>
5757
alert(ex.message);
5858
throw ex;
5959
}
60-
};
60+
})();
6161
</script>
6262
</body>
6363

64-
</html>
64+
</html>

0 commit comments

Comments
 (0)