We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a0690e7 + 09405c0 commit 8584867Copy full SHA for 8584867
1 file changed
widget/src/src/cap.js
@@ -656,8 +656,14 @@
656
657
async connectedCallback() {
658
this.#host = this;
659
- this.#shadow = this.attachShadow({ mode: "open" });
660
- this.#div = document.createElement("div");
+
+ if (!this.shadowRoot) {
661
+ this.#shadow = this.attachShadow({ mode: "open" });
662
+ } else {
663
+ this.#shadow = this.shadowRoot;
664
+ }
665
666
+ if (!this.#div) this.#div = document.createElement("div");
667
this.createUI();
668
this.addEventListeners();
669
this.initialize();
0 commit comments