Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Today to create a web component we have to write a piece of JavaScript code just to register a custom element. Web component needs to give a next step. If we want people to use it more we should let them create small components without friction. A small component is just a custom element for encapsulating template and/or style, no JS required.
A declarative way to define custom elements appears to solve the problem above. Some proposals has already been made, but apparently, none has evolved.
I've been doing some experiments on this topic and I've created a polyfill for the tag
<component>
which can be the wrapper for declarative define a custom element.Imagine you can define a custom element like this:
You can find several live examples using the polyfill here.
I would like to invite some people to join the conversation:
@ebidel, @rniwa, @trusktr
What do you think?
Thanks