JsBarcode
JsBarcode copied to clipboard
In ShadowDom : NoElementException: No element to render on.
Hi Folks,
Having trouble when I have my Angular element in the shadow dom. It can't seem to find the element. I am loading in the javascript to execute JsBarcode from a server and creating a script element on the shadowRoot. It is executing, but it can't find the element in question.
Is there any way to work around this issue?
set scriptContents(javascript: string) {
this._scriptContents = javascript;
const scriptElement = document.createElement('script');
scriptElement.textContent = javascript;
this.elementRef.nativeElement.shadowRoot.appendChild(scriptElement);
}