diff options
Diffstat (limited to 'src/svg.js')
-rw-r--r-- | src/svg.js | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -14,6 +14,7 @@ var SVG = this.SVG = function(element) { SVG.ns = 'http://www.w3.org/2000/svg' SVG.xmlns = 'http://www.w3.org/2000/xmlns/' SVG.xlink = 'http://www.w3.org/1999/xlink' +SVG.svgjs = 'http://svgjs.com/svgjs' // Svg support test SVG.supported = (function() { @@ -116,6 +117,9 @@ SVG.adopt = function(node) { if (element instanceof SVG.Doc) element.namespace().defs() + // pull svgjs data from the dom (getAttributeNS doesn't work in html5) + element.setData(JSON.parse(node.getAttribute('svgjs:data')) || {}) + return element } |