aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/element.js3
-rw-r--r--src/wrap.js1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/element.js b/src/element.js
index 3ba20b1..a1a5ccc 100644
--- a/src/element.js
+++ b/src/element.js
@@ -4,7 +4,8 @@
//
SVG.Element = function Element(node) {
/* keep reference to the element node */
- this.node = node;
+ if (this.node = node)
+ this.type = node.nodeName;
/* initialize attribute store with defaults */
this.attrs = {
diff --git a/src/wrap.js b/src/wrap.js
index 0ae3a03..656f93f 100644
--- a/src/wrap.js
+++ b/src/wrap.js
@@ -4,6 +4,7 @@ SVG.Wrap = function Wrap(element) {
/* insert and store child */
this.node.insertBefore(element.node, null);
this.child = element;
+ this.type = element.node.nodeName;
};
// inherit from SVG.Shape