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

[DOM4] Question about collections versus maps

From: Alan Stearns <stearns@adobe.com>
Date: Tue, 10 Apr 2012 12:35:27 -0700
To: "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <CBA9D98F.AE5F%stearns@adobe.com>

I am working on updating the CSS Regions CSSOM APIs
(http://dev.w3.org/csswg/css3-regions/#cssom_view_and_css_regions). CSS
Regions adds a set of named flows (created by the flow-into property) to
the Document, currently as a collection:

partial interface Document {
  readonly attribute NamedFlowCollection namedFlows;
  NamedFlow? getFlowByName(DOMString name);
interface NamedFlowCollection {
  readonly attribute unsigned long length;
  getter NamedFlow? item (unsigned long index);

One suggestion we've received
(http://lists.w3.org/Archives/Public/www-style/2012Feb/0327.html) is to
replace the collection with a map, which I believe would look like this:

partial interface Document {
  readonly attribute NamedFlowMap namedFlows;

interface NamedFlowMap {
  getter NamedFlow? (DOMString name);

What is this group's API preference for a set of objects identified by


Received on Tuesday, 10 April 2012 19:35:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:33 UTC