We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the example set out in the READ.me gives me the following error in Chrome browser:
Uncaught TypeError: AwesomeQR is not a constructor at FileReader.reader.onload (jsqr.html:23)
What am I doing wrong?
I also had to add (dataURL) => '') instead of (dataURL) =>) to have the page load simply to test.
HTML Code is:
<script src="dist/awesome-qr.js"></script> <body> <input type="file" onchange="previewFile()"><br> <img src="" height="200" alt="Image preview..."> <script> var background; const preview = document.querySelector('img'); var reader = new FileReader(); reader.onload = function () { preview.src = this.result; background = this.result; new AwesomeQR({ text: "AwesomeQR by Makito - Awesome, right now.", size: 500, backgroundImage: background, }).draw().then((dataURL) => ); }; function previewFile() { const file = document.querySelector('input[type=file]').files[0]; if (file) { reader.readAsDataURL(file); } } </script> </body>
The text was updated successfully, but these errors were encountered:
set constructor like this
new AwesomeQR.AwesomeQR({
Sorry, something went wrong.
No branches or pull requests
Using the example set out in the READ.me gives me the following error in Chrome browser:
Uncaught TypeError: AwesomeQR is not a constructor
at FileReader.reader.onload (jsqr.html:23)
What am I doing wrong?
I also had to add (dataURL) => '') instead of (dataURL) =>) to have the page load simply to test.
HTML Code is:
The text was updated successfully, but these errors were encountered: