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

Re: Imperative API for Node Distribution in Shadow DOM (Revisited)

From: Domenic Denicola <d@domenic.me>
Date: Thu, 30 Apr 2015 13:00:23 +0000
To: Anne van Kesteren <annevk@annevk.nl>
CC: Ryosuke Niwa <rniwa@apple.com>, Justin Fagnani <justinfagnani@google.com>, WebApps WG <public-webapps@w3.org>, Erik Bryn <erik@erikbryn.com>, "Dimitri Glazkov" <dglazkov@google.com>, Edward O'Connor <eoconnor@apple.com>, "Steve Orvell" <sorvell@google.com>
Message-ID: <1430398821797.32243@domenic.me>
> This essentially forces distribution to happen since you can observe the result of distribution this way. Same with element.offsetWidth etc. And that's not necessarily problematic,

OK. So the claim that the current spec cannot be interoperably implemented is false? (Not that I am a huge fan of <content select>, but I want to make sure we have our arguments against it lined up and on solid footing.)

> but it is problematic if you want to do an imperative API as I tried to explain in the bit you did not quote back.

Sure, let's dig in to that claim now. Again, this is mostly clarifying probing.

Let's say we had an imperative API. As far as I understand from the gist, one of the problems is when do we invoke the distributedCallback. If we use MutationObserve time, then inconsistent states can be observed, etc.

Why can't we say that this distributedCallback must be invoked at the same time that the current spec updates the distribution result? Since it sounds like there is no interop problem with this timing, I don't understand why this wouldn't be an option.
Received on Thursday, 30 April 2015 13:00:59 UTC

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