Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to implement and ship: SVGElement.prototype.dataset

74 views
Skip to first unread message

Boris Zbarsky

unread,
Aug 10, 2016, 5:53:15 PM8/10/16
to
Summary: HTML elements have a .dataset property that allows convenient
somewhat structured access to data-* attributes. The proposal is to add
this to SVG elements too, following corresponding changes in the SVG
specification.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=921834

Link to standard:
https://svgwg.org/svg2-draft/types.html#__svg__SVGElement__dataset
(draft so far)

Platform coverage: All.

Estimated or target release: Firefox 51

Preference behind which this will be implemented: None.

WebKit and Blink before Chrome version 45 support .dataset on all
elements. Current Blink and Edge do not support this.

I'm adding some basic web platform tests in the patch in the bug.

-Boris

Aryeh Gregor

unread,
Aug 15, 2016, 1:57:40 PM8/15/16
to Boris Zbarsky, dev-pl...@lists.mozilla.org
On Thu, Aug 11, 2016 at 12:53 AM, Boris Zbarsky <bzba...@mit.edu> wrote:
> Summary: HTML elements have a .dataset property that allows convenient
> somewhat structured access to data-* attributes. The proposal is to add
> this to SVG elements too, following corresponding changes in the SVG
> specification.

Why doesn't this just go on Element, like .className and .id? Is
there any reason we would want these any less on MathML or whatever
(supposing anyone were to actually use them)?

Boris Zbarsky

unread,
Aug 22, 2016, 8:29:47 AM8/22/16
to
On 8/15/16 1:57 PM, Aryeh Gregor wrote:
> Why doesn't this just go on Element, like .className and .id?

If you think it should, and can convince Blink and Edge to do that, we
could do it from a technical point of view.

From a theoretical point of view, it doesn't seem like as generic a
concept as className/id, not least because it effectively reserves a
whole bunch of attribute names that may already be in use in random XML
dialects. I guess this is the reason why we would want these less on
"whatever". MathML doesn't have this problem, of course.

-Boris
0 new messages