W3C home > Mailing lists > Public > public-html@w3.org > August 2008

DOMStringMap - get keys, et length?

From: Jeff Schiller <codedread@gmail.com>
Date: Wed, 6 Aug 2008 13:10:41 -0500
Message-ID: <da131fde0808061110m11ef682ep937579aaab555c3@mail.gmail.com>
To: "HTML WG" <public-html@w3.org>

I think there should be a way to get a collection of key names from
the DOMStringMap [1].  How about adding a fourth method to this

DOMStringList keys();  // XXX4 ?

Where this returns a DOMStringList [2] of keys (with no specification
on the order of keys, of course).

Also, I seem to remember seeing text in the HTML5 spec to the effect that:

<span id="foo" data-bar="baz" />
  alert( document.getElementById("foo").dataset.bar );

would spit out "baz".  I guess this was removed in favor of the
DOMStringMap interface?  If so, why?  Sorry, I know this must have
been discussed so a simple pointer to the discussion is fine.


[1] http://www.whatwg.org/specs/web-apps/current-work/#domstringmap
[2] http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#DOMStringList
Received on Wednesday, 6 August 2008 18:11:17 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:36 UTC