|
|
|
|
|
by MrJohz
406 days ago
|
|
In React, say, I might write <MyComponent worker={worker} />
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 = `<my-component worker="${worker}">`
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 = `<my-component>`
this.firstChild.worker = worker;
|
|