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

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

From: Anne van Kesteren <annevk@annevk.nl>
Date: Mon, 27 Apr 2015 16:04:20 +0200
Message-ID: <CADnb78jUyyfOP52E1tsT-7mMB9jQ-cxf4YfPZQbXht1agFECqQ@mail.gmail.com>
To: Matthew Robb <matthewwrobb@gmail.com>
Cc: Justin Fagnani <justinfagnani@google.com>, Ryosuke Niwa <rniwa@apple.com>, WebApps WG <public-webapps@w3.org>, Erik Bryn <erik@erikbryn.com>, Dimitri Glazkov <dglazkov@google.com>
On Mon, Apr 27, 2015 at 3:41 PM, Matthew Robb <matthewwrobb@gmail.com> wrote:
> I know this isn't the biggest deal but I think naming the function
> distribute is highly suggestive, why not just expose this as
> `childListChangedCallback` ?

Because that doesn't match the actual semantics. The callback is
invoked once distribute() is invoked by the web developer or
distribute() has been invoked on a composed ancestor ShadowRoot and
all composed ancestor ShadowRoot's have already had their callback
run. (Note that the distribute callback and the distribute method are
different things.)

Since the distribute callback is in charge of distribution it does in
fact make sense to call it such I think.


-- 
https://annevankesteren.nl/
Received on Monday, 27 April 2015 14:04:49 UTC

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