Initialisation of Custom Elements Inside Document Fragment

Consider this HTML template with two flat x-elements and one nested. How to initialise (fire constructor) all custom elements in cloned from fooTemplate document fragment without appending it to DOM, neither by extending built-in elements with is=”x-element”; either entire fragment. Note that script executes with defer attribute. Answer We can initialise template with this arrow function: Or with this method defined on template prototype (I prefer this way): In any case in result this code will work fine: I’m not sure if these methods are the most effective way to initialise custom elements in template. Also note that there is

How should I reference assets in angular custom element (Web Components)

I have created a web component and I referenced image from my asset folder in there as below on local everything is fine, I published my custom element to firebase host and javascript, css and asset folder already exist on my host. then I tried to use my web component in another html peage as below and served this via a local http server (http-server) The problem is images are loading from ./assets/bot.png which doesn’t exist in in the hosted website, and they exists on my published website in firebase. I know that I can refer them by a full