summaryrefslogtreecommitdiffstats
path: root/src/svg.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/svg.js')
-rw-r--r--src/svg.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/svg.js b/src/svg.js
index c8454f0..ebe298c 100644
--- a/src/svg.js
+++ b/src/svg.js
@@ -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
}