Earlier quoted context omitted.
What would you expect that to do, in any framework?
In React, say, I might write and expect the worker instance to be passed as an object to `MyComponent` as a prop. But with webcomponents, I can't do something like that. this.innerHTML = ` ` will just stringify the worker and pass that string to the `my-component`. To get the worker instance to be passed correctly, I'd need to do something like this.innerHTML = ` ` this.firstChild.worker = worker;
Tbh, I'm not sure there's a way for that. But why not just define a method in your target child component and pass the worker in there?