Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[declarative-custom-elements] POC in shadow-dom-element #5

Open
sashafirsov opened this issue Sep 30, 2022 · 0 comments
Open

[declarative-custom-elements] POC in shadow-dom-element #5

sashafirsov opened this issue Sep 30, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@sashafirsov
Copy link
Owner

sashafirsov commented Sep 30, 2022

DCE standard proposal is not yet shaped and what is on proposal is far from Declarative Web Application which should be functional without JavaScript.

<shadow-dom-element> has all means for defining the DCE except of tag name.

Proposed syntax

<shadow-dom-element tag="my-component" code="template.html" ></shadow-dom-element>
<my-component>rendered by <b slot="link-title">template.html</b></my-component>

Note that src attribute and payload is missing which along with assigned tag would omit the inline UI generation and instead declare custom element. In given sample both lines would produce same DOM:

<shadow-dom-element tag="my-component" code="template.html" >ABC</shadow-dom-element>
<my-component>ABC</my-component>

inline payload

When both payload (via src or DOM) and tag is provided, the component would be rendered inline as a tag.

light-dom-element

would inherit this behavior enabling DCE without shadow root

Links

@sashafirsov sashafirsov added the enhancement New feature or request label Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant