Would it be possible to add an optional attachTo property to IconContext, that gets passed through to updateCSS when you call useInsertStyles? The updateCSS function already supports this.
The use case is that I'd like to include an icon within a Web Component's shadow DOM. I want the style sheet to be inserted inside the shadow DOM, instead of the document head, so it only affects the component.
So it would ideally support ShadowRoot elements as well as other Element types.
Would it be possible to add an optional
attachTo
property toIconContext
, that gets passed through toupdateCSS
when you calluseInsertStyles
? TheupdateCSS
function already supports this.The use case is that I'd like to include an icon within a Web Component's shadow DOM. I want the style sheet to be inserted inside the shadow DOM, instead of the document head, so it only affects the component.
So it would ideally support
ShadowRoot
elements as well as otherElement
types.