Giter Club home page Giter Club logo

template-shadowroot's People

Contributors

augustjk avatar bicknellr avatar e111077 avatar justinfagnani avatar matthewp avatar rictic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

template-shadowroot's Issues

Move to polyfills repo

This spec has progress and is shipping in Chrome. We should move it into the webcomponents/polyfills repo and figure out a bundle/loader strategy.

query selector and mutation observer declarative shadowroot implementations

A querySelector based implementation (rather than a manual walk) will be smaller and potentially faster.

A mutation observer option would allow a polyfill option rather than just a ponyfill, so non-native browsers would get native-like behavior without the need to call a function, though the timing would be different (mutation observer timing, so one microtask tick)

DOM nodes added by extensions cause failure

Hi, it looks like there are cases where DOM nodes being added by extensions cause the polyfill to choke. I'm my specific case it's using Windows 11, Firefox, Grammarly desktop, and a website built using a common pattern of hiding the body element until the polyfill has finished executing. I imagine this should probably be handled since website visitors would have no understanding as to why they just see an empty page. I can take a look at doing a PR if that's the direction the maintainers want to take.

Deprecated API harms Lighthouse score

Hi there, I just noticed that when I run Lighthouse with this polyfill, in Chromium browsers these lines are flagged as a deprecated API and severely reduce the Best Practices result. It seems from here that this needs to be updated to use parseHTMLUnsafe() instead? I can put in a PR for this if that's acceptable

Build legacy script for use as polyfill that hydrates shadow roots on page

Task to build a legacy script for use as polyfill that hydrates shadow roots on page, without needing to import modules and call hydrateShadowRoots in user code.

We may want one or more options on how this would work:

  • Use MutationObserver to hydrate shadow roots as they are encountered, for better streaming support (as noted in the mutation-observer.ts implementation, this likely needs to be more sophisticated to avoid hydrating partially-parsed templates
    • To confirm: Does the parser actually yield in the middle of a large template? If so, may need more sophisticated logic around e.g. detecting that the next element after the <template> has opened before hydrating a given template
    • What is the perf impact of using MutationObserver over one-shot DOMContentLoaded?
  • Wait until DOMContentLoaded and upgrade all in one shot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.