diff options
author | wout <wout@impinc.co.uk> | 2012-12-17 19:39:52 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2012-12-17 19:39:52 +0100 |
commit | 8dfec33b4fa79b89d89a07e3ae92c5d5c5f8ce73 (patch) | |
tree | 7caa493057b543ac40008770fdb4df566995c4e7 /src/doc.js | |
parent | 6a013f19d6fa84e538d31bca5f1466c5f3479630 (diff) | |
download | svg.js-8dfec33b4fa79b89d89a07e3ae92c5d5c5f8ce73.tar.gz svg.js-8dfec33b4fa79b89d89a07e3ae92c5d5c5f8ce73.zip |
Code slimming
Diffstat (limited to 'src/doc.js')
-rw-r--r-- | src/doc.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/doc.js b/src/doc.js new file mode 100644 index 0000000..41b157f --- /dev/null +++ b/src/doc.js @@ -0,0 +1,19 @@ + +SVG.Doc = function Doc(e) { + this.constructor.call(this, SVG.create('svg')); + + this.attr('xmlns', SVG.ns); + this.attr('version', '1.1'); + this.attr('xlink', SVG.xlink, SVG.ns); + + if (typeof e == 'string') + e = document.getElementById(e); + + e.appendChild(this.node); +}; + +// inherit from SVG.Element +SVG.Doc.prototype = new SVG.Element(); + +// include the container object +SVG.Utils.merge(SVG.Doc, SVG.Container);
\ No newline at end of file |