Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Upgrade shadow root contents when defining new CEs #25337

Merged
merged 3 commits into from
Oct 30, 2019

Commits on Oct 30, 2019

  1. Upgrade shadow root contents when defining new CEs

    When we've already initialized the the custom element registry, it used to drop the list of shadow roots. When a new CE was defined, we would then only query the host `document` (since we dropped all the shadow roots from the array). Obviously, that query selector won't find CEs inside the shadow tree.
    
    So, we need to keep the list of shadow roots, that way we can query inside them when defining new custom elements.
    
    Note, this will mean leaking every shadow permenantly. Even if the shadow's host is removed from the document, we'll still have to keep its reference. We could setup a long running interval to find disconnected trees, but it wouldn't be able to tell the difference between a temporarily disconneded shadow and a destoyed shadow.
    jridgewell committed Oct 30, 2019
    Configuration menu
    Copy the full SHA
    06fe741 View commit details
    Browse the repository at this point in the history
  2. Fix comment

    jridgewell committed Oct 30, 2019
    Configuration menu
    Copy the full SHA
    2ba2990 View commit details
    Browse the repository at this point in the history
  3. Remove unused private

    jridgewell committed Oct 30, 2019
    Configuration menu
    Copy the full SHA
    628239b View commit details
    Browse the repository at this point in the history