- From: mildred <notifications@github.com>
- Date: Thu, 05 Dec 2024 16:48:36 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <WICG/webcomponents/issues/1090/2521840313@github.com>
To answer some of #1009 questions: * Declaration * How are attributes and properties declared? **do they need declaration?** * How are styles declared? **`<link rel="stylesheet">` inline inside the template, it should be possible to inherit parent styles** * Are registrations always global, or can they be scoped? **scoped seems better to prevent grandchildren custom elements to conflict** * Scripting * Do declarative custom elements run with JavaScript disabled? **yes** * Will HTML Modules be importable from HTML with JavaScript disabled? **yes** * What is the base class for a declarative custom element? Does it directly extend HTMLElement, or is there another class with shared behavior? **The same way that custom elements are enhanced seems a good thing, just the shadow root would already be attached** * Can a declarative custom element be enhanced with script? **yes with standard `customElements.define(...)`** * How is that script associated with the element? **any `<script>` that is executed at the declaration time that used `customElements.define(...)`** * Must the script be inline, or can it be bundled? **both can work depending if the `<script>` tag has a `src` attribute** * Can the script be loaded late? Is there an upgrade-like step when it does? **yes, same as current custom elements** * Lifecycle * How do elements detect changes to data? **through events** * When do element re-render? Synchronously or asynchronously? **good question** * Templates : **templating is not performed by the user agent, all these concerns go away** * Security * Do declarative custom elements introduce a script gadget vulnerability? **use same rules as with existing HTML?** * Is expression evaluation sanitized? **no templating to evaluate simple functions, either javascript is disabled and minimum templating is available through slots, or javascript is enabled by policy and anything javascript can do is possible** * **for the rest, there is no data binding to worry about** -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/1090#issuecomment-2521840313 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/1090/2521840313@github.com>
Received on Friday, 6 December 2024 00:48:40 UTC