[whatwg] [html5] r5307 - [giow] (0) use vendor--feature instead of _vendor-feature since Apple engineers [...]
Simetrical+w3c at gmail.com
Tue Aug 31 12:48:47 PDT 2010
On Tue, Aug 31, 2010 at 3:48 AM, Simon Pieters <simonp at opera.com> wrote:
> If a vendor is called "data", then data--feature becomes a data-* attribute
> and is included in .dataset.
I missed the fact that "data--foo" is actually a valid data attribute.
I guess I assumed that the name part couldn't start with a hyphen.
"data--foo" would be accessed via JS as .dataset.Foo rather than
.dataset.foo because of a degenerate application of the camel-casing
rules, but it's allowed.
Anyway, I preferred the initial-underscore convention -- it's easier
to spot, and would be more understandable to people who know CSS.
More information about the whatwg