Chromium has shipped [1] a version of declarative shadow DOM in M90 which currently has 0.002% usage [2]. Mostly, that low usage is due to the spec PR being stalled with no input from other implementers. Recently, there has been renewed interest in the feature, and discussions have resumed. As part of those discussions, two changes are being requested: 1. Rename the `<template>` attribute from `shadowroot` to `shadowrootmode`. 2. Support streaming, by attaching the shadow root on the opening, rather than the closing, template tag. Chromium would like to prototype these changes. [1] https://chromestatus.com/feature/5191745052606464 [2] https://chromestatus.com/metrics/feature/timeline/popularity/3196
Developers have always wanted declarative shadow DOM to support streaming, but other implementers were always opposed to making the required changes to the HTML parser. Recently, those concerns were changed, and other implementations proceeded with a streaming prototype.
The new version of declarative shadow DOM has observable differences in behavior. The plan for prototyping the new approach while keeping the functionality of the old approach is to trigger the new streaming behavior based on the presence of the new attribute `shadowrootmode`. If the (old) `shadowroot` attribute is used, the old non-streaming behavior will be used. This should ensure there are no compat risks, as we transition to the new behavior. Eventually, the plan would be to deprecate the old non-streaming behavior and `shadowroot` attribute.
No difference from existing, shipped declarative shadow DOM implementation.
No difference from existing, shipped declarative shadow DOM implementation.
No difference from existing, shipped declarative shadow DOM implementation.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
No difference from existing, shipped declarative shadow DOM implementation.
No milestones specified
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM%3DNeDg1Aa7f5j3Kbqag_QwWYpLhAqwkDo0Sv1Xt5mtPCpmkBw%40mail.gmail.com.
+1; great news on the streaming front.On the potential attribute name change, is it not possible to introduce streaming behaviour under the old name?
In general, we should not agree to changes that are purely cosmetic after shipping, and spec PR conversations aren't a substitute for developer feedback.I'm disinclined to suggest we ship a renamed feature for purely editorial reasons. Can we proceed to test under the old names to detect possible breakage?
On Thu, Dec 8, 2022 at 11:28 PM Alex Russell <sligh...@chromium.org> wrote:In general, we should not agree to changes that are purely cosmetic after shipping, and spec PR conversations aren't a substitute for developer feedback.I'm disinclined to suggest we ship a renamed feature for purely editorial reasons. Can we proceed to test under the old names to detect possible breakage?I do see your point, and I wish we'd had these conversations (about naming and behavior) 2+ years ago when I tried very hard to engage with the other implementers. Having said that, one nice thing about the new name is that it gives a compat-guaranteed path to streaming. And of the two changes (streaming, and a new name), I think there is ample evidence that developers care a lot about streaming, and likely don't care what the attribute is called, other than typing 4 more characters. There will be some migration pain, for sure, but it's probably worth it for an interoperable standard and no compat risk.
So is the concrete proposal that Blink support attributes in perpetuity? With different behaviour? Or the same behaviour? And/or that we do a deprecation/removal for the old attribute name?
In general, when the API OWNERs give the go-ahead for something to ship out ahead of other vendors, particularly when we have worked diligently (as you have) to engage folks with no response, we're staking your claim to the shipped system. Not only did you reach out, but you ran public OTs, discussed at TPAC (among other venues), and did everything I can think of to ground this design in data and developer needs.It's traumatic for the ecosystem for us to flip-flop (see my mistake w/ WC v0 vs v1 incompatibility), and so we shouldn't do this if there's not an overwhelming reason to do so. Generally, the best stance in this situation is "ok, we tried, you didn't show up, compatible additions only from here on out". Renaming in response to multi-year delays in engagement, after years of developer enthusiasm for a feature, only rewards hostage taking behaviour from trailing projects
I think it can be interesting to consider this rename regardless of other vendors.Mason - what would happen if we changed the behavior of the current attribute in place without renaming it? What would be the implications for current users of the API?