Skip to content

Commit 0a4be07

Browse files
authored
Update 11.read-video-requirejs.html
1 parent a42a9e0 commit 0a4be07

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

1.hello-world/11.read-video-requirejs.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h1 style="font-size: 1.5em;">Hello World for RequireJS</h1>
3232

3333
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.1/dist/";
3434
let pScanner = null;
35-
window.onload = async function() {
35+
(async function() {
3636
try {
3737
const scanner = await (pScanner = pScanner || BarcodeScanner.createInstance());
3838
scanner.onFrameRead = results => {
@@ -50,9 +50,9 @@ <h1 style="font-size: 1.5em;">Hello World for RequireJS</h1>
5050
alert(ex.message);
5151
throw ex;
5252
}
53-
};
53+
})();
5454
})
5555
</script>
5656
</body>
5757

58-
</html>
58+
</html>

0 commit comments

Comments
 (0)