-
Notifications
You must be signed in to change notification settings - Fork 12
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
DCE proposals matrix #81
Comments
Things that may be missing:
|
@EisenbergEffect , can you
|
|
I have attempted to take the features we have today in the imperative API for custom elements, things that have been discussed as W3C protocols (e.g. context), ongoing W3C standards efforts (e.g. DOM Parts), ongoing TC39 efforts (e.g. Signals), and make those the foundation of a declarative model for custom elements, while avoiding things that browser implementors said they won't/can't do. I am not trying to invent a bunch of new core features. There are gaps (template expression syntax), which I am trying to fill in. But on the whole, I'm mainly trying to figure out how we support our current imperative capabilities in a declarative fashion. |
|
Declarative Custom Elements(DCE) has various POC and ideas on architecture and individual features.
Here is a list to be compared during demo day #80. The list meant to highlight the commonality/difference on each POC.
As of now most of it is part of @epa-wg/custom-element implementation.
template
as DCE declaration tagelement
andcustom-element
tag
or root attribute( tbd, shadowrootmode , etc.) as shadow is not only option discussed, the genericroot
is more appropriate IMO.tag
tag
as attribute for DCE element. Seems no disagreement.src
or other attribute for external template.img
taghidden
- enabled by default attribute to prevent declaration rendered in page, needed for legacy browserstemplate
<style>
should not be applied on page level;<script>
is not executed.parameters
Support for
Syntax
<xsl:param>
- with optionalxsl
namespace.name
- parameter name, also DCE instanve attribute nameData injection
{}
single curbed brackets<xsl:value-of>
slots
support as in<template>
, native is not working on standard level :(dataset
fromdata-xxx
attributespayload
- content of instance payload including all slotsslice
- internal elements value reflected indatadom/slice
template
slots
supportDynamic data manipulation and state change reflection
Sufficient set of functional components for simple app flows
events handling
reflect the event to state lead to UI re-render.
non-declarative syntax
<script>
for exporting DCE classThe text was updated successfully, but these errors were encountered: