We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a42a9e0 commit 0a4be07Copy full SHA for 0a4be07
1.hello-world/11.read-video-requirejs.html
@@ -32,7 +32,7 @@ <h1 style="font-size: 1.5em;">Hello World for RequireJS</h1>
32
33
BarcodeReader.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.0.1/dist/";
34
let pScanner = null;
35
- window.onload = async function() {
+ (async function() {
36
try {
37
const scanner = await (pScanner = pScanner || BarcodeScanner.createInstance());
38
scanner.onFrameRead = results => {
@@ -50,9 +50,9 @@ <h1 style="font-size: 1.5em;">Hello World for RequireJS</h1>
50
alert(ex.message);
51
throw ex;
52
}
53
- };
+ })();
54
})
55
</script>
56
</body>
57
58
-</html>
+</html>
0 commit comments