Giter Site home page Giter Site logo

Comments (2)

WebReflection avatar WebReflection commented on June 16, 2024 3

So, this project has been about Custom Elements only since about ever, and its successor is @ungap/custom-elements-builtin.

Web Components, as defined by standards, have (used to be 4 but ...) 3 sub proposals: Shadow DOM, Custom Elements, and the AFAIK dead HTML Imports idea.

The Template element somehow got out of that Wikipedia page.

Accordingly, you'll never find Shadow DOM in here for at least two reasons:

  • Custom Elements, and builtin extends, don't need ShadowDOM, it's a specification a part
  • ShadowDOM cannot be polyfilled, so that the closest attempt I've made is attachShadow, which provides an extremely minimal attempt at simulating ShadowDOM.

In few words, ShadowDOM is a specification a part, it cannot be reliably polyfilled, because old browsers don't have its capabilities, and every polyfill for ShadowDOM is inherently broken, but evangelists/advocates wont tell this story to anyone.

TL;DR no, ShadowDOM has no place in here, because it's a polyfill/specification a part, and it's a broken promise itself, as polyfill.

Apologies for not answering the way you hoped for, but that's just the reality.

from document-register-element.

WebReflection avatar WebReflection commented on June 16, 2024 3

by the way, if you're looking for a helper that doesn't need ShadowDOM and yet let you configure in a better way CSS for any Custom Element, check ยตce out, as it covers it all, without ShadowDOM in between (and yet, it's compatible with ShadowDOM, so you have a future proof helper right there)

from document-register-element.

Related Issues (20)

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.