Skip to content

Bad Template Results in Error on Chrome #6

Description

@ava-cassiopeia

The template that this generates will cause browsers that have a native implementation of the custom element spec to throw an error when trying to instantiate an instance of the new custom element using document.createElement("[custom-element-name]").

This is because the shadow root is being build in the constructor. The fix here is to make sure that the generation of child elements (such as the shadow root) happens in the connectedCallback() function.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions