Re: DOMStringMap - get keys, et length?

On Wed, Aug 6, 2008 at 8:10 PM, Jeff Schiller wrote:
>
> 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?

dataset is a DOMStringMap, which defines XXX1 as a [NameGetter], so
dataset.bar is equivalent to dataset.XXX1("bar")

http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#domstringmap
http://www.w3.org/TR/html5/dom.html#domstringmap

-- 
Thomas Broyer

Received on Wednesday, 6 August 2008 20:50:34 UTC