Skip to content

[ShadyCSS] Expose prepareTemplate for non template DocumentFragments #26

Open
@tomalec

Description

@tomalec

As briefly suggested at README.md#usage, to support VanillaJS elements I need to use ShadyCSS API manually.

  1. 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 ;)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions