W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2015

Shadow DOM Imperative API proposal #1 vs <content select/slot>

From: Anne van Kesteren <annevk@annevk.nl>
Date: Fri, 1 May 2015 17:15:53 +0200
Message-ID: <CADnb78ju2ceaL+CrsfUWQrqDDFWkqibD+bLhwyAAcZOJTkoW2A@mail.gmail.com>
To: WebApps WG <public-webapps@w3.org>
Cc: Wilson Page <wpage@mozilla.com>
Wilson Page attempted to implement <content select> (with microtask
observers as a timing solution for the time being) to see whether that
proposal was workable:

  https://gist.github.com/wilsonpage/d5520bd8d22327633e33

Compared to how <content select> is implemented in #2 this looks
rather jarring and we're not even sure whether it's correct.

If someone could confirm whether it's correct or provide a complete
solution I'd like to add it to the overall proposal page so that the
proposals can be more easily compared:

https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Imperative-API-for-Node-Distribution-in-Shadow-DOM.md

We should also provide a <content slot> implementation for the various
solutions to see whether they can meet that proposal. Though I think
as <content slot> was originally proposed the solution with #1 would
get equally complex due to having to do recursive unwrapping of
<content> elements in script. And the solution with #2 would be
equally simple.

(I updated that page quite significantly by the way to clarify #1 a
bit, make #2 more readable, and also added some alternative solutions
to the timing problem.)


-- 
https://annevankesteren.nl/
Received on Friday, 1 May 2015 15:16:17 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:31 UTC