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.
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