Re: [whatwg/dom] Declarative Shadow DOM (#831)

> Having made my argument against having an opt-in mechanism, I'm unclear on what @rniwa now thinks is the best way forward for this feature.

The best way forward is to come up with a solution that satisfies all the constraints. It's possible that the problem is over constrained and we need to pick the least problematic / evil solution among them but we're not there yet.

> As for `<shadowroot>`, when Declarative Shadow DOM was under discussion in 2017, @rniwa was just one among many voices, including Chrome devs, saying that adopting a new element like `<shadowroot>` was a non-starter. The explainer for Declarative Shadow DOM has a whole section on this ("[Syntax: `<template shadowroot=open>` vs. `<shadowroot>`](https://github.com/mfreed7/declarative-shadow-dom/blob/master/README.md#syntax-template-shadowrootopen-vs-shadowroot)") and it quotes @rniwa's [comment from 2018](https://github.com/whatwg/dom/issues/510#issuecomment-372224104) as evidence that implementers won't support adding `<shadowroot>`, due to the potential for security bugs.

That comment specifically refers to the old proposal of introducing a new HTML parser macro which interprets `<shadowroot>` as a start of shadow root, then stream its content into the shadow root, and not creating an element for `<shadowroot>` itself. That has a number of drawbacks and implementation challenge as I pointed out in that comment. Implementing the proposed semantics of `<template shadowroot>` using a element of new name doesn't pose nearly the same issues as far as I've thought about it thus far.

> You say you haven't given up hope on this feature, but if `<shadowroot>` is the only way forward, and `<shadowroot>` is a non-starter, then I see no way forward at all.

You're making a whole bunch of assumptions there. I don't necessarily think `<shadowroot>` is the only way forward even though that might be a promising approach and there are many ways to define what `<shadowroot>` would do, not all such definitions are problematic. We just need to find a solution that satisfies all the constraints we've identified thus far.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/831#issuecomment-716080652

Received on Sunday, 25 October 2020 01:52:05 UTC