W3C home > Mailing lists > Public > www-style@w3.org > June 2012

Re: [css3-regions] Improve the NamedFlow JS interface

From: Alan Stearns <stearns@adobe.com>
Date: Wed, 27 Jun 2012 17:25:37 -0700
To: Andrei Bucur <abucur@adobe.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <CC10F247.125B4%stearns@adobe.com>
On 6/25/12 7:19 AM, "Andrei Bucur" <abucur@adobe.com> wrote:
>
>On 6/21/12 11:18 PM, "Alan Stearns" <stearns@adobe.com> wrote:
>
>>On 6/21/12 8:36 AM, "Andrei Bucur" <abucur@adobe.com> wrote:
>>
>>>Hello,
>>>
>>>I've been reading the thread [1] on the public-webapps list and I was
>>>wondering if anyone came up with a common use case for enumerating all
>>>the
>>>NamedFlows in a Document. If not, I would like to re-propose making the
>>>namedFlow collection indexable by name.
>>>As long as there's a way (e.g. using Object.keys()) to iterate through
>>>the
>>>NamedFlow objects, I think it's more intuitive for a JS developer to see
>>>the collection as a map. Having both a getter function (getFlowByName())
>>>and the collection attribute (namedFlows) seems confusing (questions
>>>like
>>>"Which one should I use?" or "What's the point of that collection?" come
>>>in my mind). Unifying the two APIs looks like a good option to me.
>>>
>>>Thoughts?
>>>
>>>Thanks,
>>>Andrei.
>>>
>>>[1] 
>>>http://lists.w3.org/Archives/Public/public-webapps/2012AprJun/0101.html
>>
>>Andrei,
>>
>>Are you suggesting we replace the NamedFlowCollection with a NamedFlowMap
>>as Tab proposed?
>>
>>Or are you suggesting we change the NamedFlowCollection getter to take a
>>string argument instead of an index, and remove Document.getFlowByName()?
>>
>>Thanks,
>>
>>Alan
>>
>
>
>I've been looking for something similar to what I imagine that exists
>today and I think this is it:
>http://www.w3.org/TR/2008/WD-html5-20080610/dom.html#htmlcollection0
>
>
>The HTMLCollection has both an index getter for easy iterations and a name
>getter for direct access to the item. Can we extend this mechanism for the
>NamedFlowCollection?
>
>Andrei.
>


That does look like an improvement to me. I've made that change.

Thanks,

Alan
Received on Thursday, 28 June 2012 00:26:05 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:55 GMT