Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
How do I generate a QR Code in JavaScript (shadowDom) and generate a data url for image?

I'm having trouble finding a library that will work in a webcomponent shadowDom. The only one that seems to be highly recommended requires an "id" as a argument (it won't find the id because its in the shadowDom.

  1. generate qr code from string (ie: url)
  2. generate a data url for img tag to display
    this.id = crypto.getRandomValues(new Uint32Array(1));
    this.data = new QRCode().makeCode(this.id);
    //this.data = QR.encode(this.id);
    this.qrCode = btoa(this.data.toByteArray()));

Here's the library: https://taisukef.github.io/qrcode-generator/es/QR.js

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!