Comments (4)
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.
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.
@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.
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)
- Generated schema contains errors HOT 3
- How to output `oneOf` for discriminated unions. HOT 1
- sync between source and manifest HOT 2
- Add support for package and element icons and screenshots HOT 1
- add funding links
- Add support for CSS CustomState
- Add support for symbol-named class members HOT 1
- Add support for including canonical URLs for References
- Needed styles for elements HOT 4
- Package name field HOT 1
- Ability to document type of detail property for CustomEvents HOT 5
- README should mention that manifest can (and should) be generated by a tool
- Publish New Version HOT 1
- Access modifier issue on derived class HOT 1
- Status of the "manifest" HOT 4
- Deomnstration Project using the Manifest... HOT 1
- To which files should the manifest link. .ts, .js, both, ... HOT 8
- componentRegistered Information HOT 1
- desc.startsWith is not a function HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from custom-elements-manifest.