Giter Site home page Giter Site logo

Comments (4)

thepassle avatar thepassle commented on August 22, 2024 1

I understood your point, but my point still stands. You can globally register custom elements in the browser, and in many cases this is not actually a problem. There are indeed cases where you'd need something like scoped elements. If you register a custom element in the global registry, you can use it via that tagName in your HTML, and a browser will know what to do with that element, so it still makes sense to support tagName in the manifest regardless of your opinion of it being a good or bad practice.

from custom-elements-manifest.

thepassle avatar thepassle commented on August 22, 2024

I dont think this is controversial at all, but browsers do support registering custom elements on the global registry however, so I think it makes sense that the manifest supports tagName.

from custom-elements-manifest.

andyearnshaw avatar andyearnshaw commented on August 22, 2024

@thepassle I'm not sure if you understood my post. I guess the gist of it is that having tagName in the manifest (and the example in the README) promotes bad practice. Browsers support registering on the global registry, but any library or package exporting a custom element should not be doing that registration, it should be up to the consumer. Therefore, the tagName should not be in the manifest because it should not be decided what the tagName is by the library or package exporting it.

from custom-elements-manifest.

justinfagnani avatar justinfagnani commented on August 22, 2024

To reenforce @thepassle's take here - the CEM is trying to describe what packages of elements can do, not prescribe what they should do. If there are elements out that the use global registration, this format should have the structure to say so.

That could enable tools that detect tag name collisions, or disallow using the global registry altogether, if that's your goal.

from custom-elements-manifest.

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.