connecting to a JavaScript scanner project

<< Click to Display Table of Contents >>

Navigation:  Forum >

connecting to a JavaScript scanner project

Forum link

 


 

05-25-2023, 02:33 AM:

 

Good afternoon! I have no experience with JS.

 

I need to connect a QR code scanner to my project. (https://github.com/nimiq/qr-scanner)

 

I copied the files to my project directory

 

/js/qr-scanner.min.js

 

/js/qr-scanner-worker.min.js

 

and added to ContentFiles

 

/js/qr-scanner.min.js

 

/js/qr-scanner-worker.min.js

 

As far as I understand, this is how I connected the scanner to my project.

 

How to do this in IW ?

 


 

06-06-2023, 04:21 PM:

 

Trying to run a demo from GitHub on a local computer gives an error :

 

Access to script at 'file:///D:/Work64/JavaScripts/qr-scanner-master/qr-scanner-master/qr-scanner.min.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.

 

How to "fasten" the scanner to my project on IW?