[whatwg] Dataset contradiction - does "data-" generate an item in .dataset?
Tab Atkins Jr.
jackalmage at gmail.com
Wed Jun 30 09:11:24 PDT 2010
In the first paragraph of
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
One of these references needs to be fixed, as webkit is implementing
dataset right now.
More information about the whatwg