Support `SVGElement.dataset` by copying `HTMLElement.dataset` (DOM API)

Fixed Issue #8489259

Details

Author
Masataka Y.
Created
Aug 15, 2016
Privacy
This issue is public.
Reports
Reported by 3 people

Sign in to watch or report this issue.

Steps to reproduce

Currently the dataset property is supported in HTMLElement but SVGElement. So it’s a bit hard to tweak data- attributes authored on SVG elements.

SVG 2 added dataset on SVGElement [1] and Gecko, WebKit recently added support [2][3]. Blink is working on it [4]. I’d love to see it on EdgeHTML.

[1] https://svgwg.org/svg2-draft/types.html#__svg__SVGElement__dataset
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=921834
[3] https://trac.webkit.org/changeset/204377
[4] https://bugs.chromium.org/p/chromium/issues/detail?id=636108

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Travis L.”

      Changed Assigned To to “Bogdan B.”

      Changed Title from “support `SVGElement.dataset`” to “Support `SVGElement.dataset` by copying `HTMLElement.dataset` (DOM API)”

      Changed Assigned To to “Travis L.”

      Changed Assigned To from “Travis L.” to “Eugene V.”

      Changed Status to “Confirmed”

    • dataset is not supported on SVG elements.

      I build a simple svg document internal to Edge.

      For a text element inside the svg document, l set attribute data-a="foo".

      Then I try to access it with

      text.dataset.a

      In Edge, it throws
      SCRIPT5007: Unable to get property ‘q’ of undefined or null reference

      Works in Chrome.

    • Typo: should be

      SCRIPT5007: Unable to get property ‘a’ of undefined or null reference

    • Microsoft Edge Team

      Changed Title from “Support `SVGElement.dataset` by copying `HTMLElement.dataset` (DOM API)” to “Support `SVGElement.dataset` by copying `HTMLElement.dataset` (DOM API)”

      Changed Assigned To from “Eugene V.” to “Kris K.”

      Changed Assigned To from “Kris K.” to “David S.”

      Changed Status from “Confirmed” to “Fixed”

    • Thanks for the report! dataset has just been added to SVGElement. It will make its way to public previews in due course. 

    You need to sign in to your Microsoft account to add a comment.

    Sign in