diff options
Diffstat (limited to 'src/doc.js')
-rwxr-xr-x | src/doc.js | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -80,9 +80,11 @@ SVG.Doc = SVG.invent({ } // Removes the doc from the DOM - , destroy: function() { - this.parent.removeChild(this.node); - this.parent = null; + , remove: function() { + if(this.parent) { + this.parent.removeChild(this.node); + this.parent = null; + } return this; } |