[whatwg] Dataset contradiction - does "data-" generate an item in .dataset?

In the first paragraph of
http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#embedding-custom-non-visible-data
it says that a custom data attribute is "an attribute in no namespace
whose name starts with the string "data-", has at least one character
after the hyphen,...".  Following this, <div data-=foo> would not put
anything in .dataset.

However, in the algorithm for getting the list of name-value pairs, it
says to process "each content attribute on the element whose first
five characters are the string "data-" and whose remaining characters
(if any)...".  Following this, <div data-=foo> would make
.dataset[""]="foo".

One of these references needs to be fixed, as webkit is implementing
dataset right now.

~TJ

Received on Wednesday, 30 June 2010 09:11:24 UTC