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

I am not personally convinced of the need here (but I don't oppose it). Let me try to help with some details that could be problematic if people want to advance this.

- We don't use hyphens in built-in attribute names. So attachshadow/shadowmode instead of attach-shadow/shadow-mode
- It seems like these could be combined into a single attribute, e.g. shadow="open|closed". If shadow is not present then it's a normal template.
- We'll have to recapitulate the great defaulting wars that led to mode being mandatory in the JS API. In particular, we need to answer what `<template shadow="asdf">` and `<template shadow>` do. Maybe the answer is nothing (as if you'd omitted the attribute), but at least for `<template shadow>` that seems unfortunate.
- Harder question: how does this interact with the existing processing model for templates?
  - Template contents are parsed in a completely separate document, the template contents owner document. That prevents e.g. script from running or images from downloading. It sounds like that will no longer be the case here?
  - What does `templateEl.content` return? Maybe it becomes an alias for `templateEl.shadowRoot`? Is that too weird?
  - What are the cloning and adopting steps?

-- 
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/510#issuecomment-329030870

Received on Wednesday, 13 September 2017 01:31:58 UTC