This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Assuming element.setAttribute("data--n", "o") has been performed on an element, element.dataset will report [ ("N", "o") ] in its key-value list result. Per "The algorithm for deleting names", http://www.whatwg.org/specs/web-apps/current-work/#embedding-custom-non-visible-data-with-the-data-*-attributes 'delete element.dataset["N"]' will remove the "data--n" property. But so will 'delete element.dataset["-n"]'. It seems slightly odd to admit this second form also. Trident (IE11) implements this, others don't, ignoring the deletion. Should the delete steps have an extra step that corresponds to step 3 from the "setting" algorithm (but is non-throwing)? Or stay as-is as the current behaviour is intentional? If the latter, perhaps a note can be added to clarify that "deletion" does allow untranslated minus-lowercase pairs to pass through verbatim?
Checked in as WHATWG revision r8359. Check-in comment: Clarify that the delete dataset[foo] algorithm doesn't get invoked for values of 'foo' that don't exist. http://html5.org/tools/web-apps-tracker?from=8358&to=8359
If I'm not mistaken, what's going on here is that IE11 has a WebIDL bug, and that the deleter algorithm in HTML won't get invoked unless the property name exists.
That looks accurate, the "named property visibility algorithm" (a predicate) needs to pass before the deleter is applied. Thanks for the clarification, could the note be made a bit a stronger? ("can get" => "will only be".)
Checked in as WHATWG revision r8371. Check-in comment: Clarification regarding 'The algorithm for deleting names' for dataset. http://html5.org/tools/web-apps-tracker?from=8370&to=8371