You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As briefly suggested at README.md#usage, to support VanillaJS elements I need to use ShadyCSS API manually.
First, call ShadyCSS.prepareTemplate(template, name) on a <template> element that will be imported into a shadowRoot
The problem is, I usually don't use a <template> to create shadowRoot (see https://github.com/webcomponents/shadycss/issues/144). Creating HTMLTemplateElement for every single string or DocumentFragment I want to put into my Shadow, seems like an overhead.
Could ShadyCSS expose a method to process DocumentFragment or string? Like StyleTransformer ;)
The text was updated successfully, but these errors were encountered:
dfreedm
changed the title
Expose prepareTemplate for non template DocumentFragments
[ShadyCSS] Expose prepareTemplate for non template DocumentFragments
Jun 12, 2019
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
As briefly suggested at README.md#usage, to support VanillaJS elements I need to use ShadyCSS API manually.
The problem is, I usually don't use a
<template>
to createshadowRoot
(see https://github.com/webcomponents/shadycss/issues/144). CreatingHTMLTemplateElement
for every single string orDocumentFragment
I want to put into my Shadow, seems like an overhead.Could
ShadyCSS
expose a method to processDocumentFragment
or string? LikeStyleTransformer
;)The text was updated successfully, but these errors were encountered: