aboutsummaryrefslogtreecommitdiffstats
path: root/src/svg.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2012-12-17 16:55:16 +0100
committerwout <wout@impinc.co.uk>2012-12-17 16:55:16 +0100
commit6a013f19d6fa84e538d31bca5f1466c5f3479630 (patch)
tree3807acc4240bb1dbd5f25406b262a240351fa67a /src/svg.js
parent9ba8a780e0da4de4839df119f1d57d7f6327b1c6 (diff)
downloadsvg.js-6a013f19d6fa84e538d31bca5f1466c5f3479630.tar.gz
svg.js-6a013f19d6fa84e538d31bca5f1466c5f3479630.zip
Refactored code for readability and size
Diffstat (limited to 'src/svg.js')
-rw-r--r--src/svg.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/svg.js b/src/svg.js
index ebb0f87..b042f12 100644
--- a/src/svg.js
+++ b/src/svg.js
@@ -1,9 +1,13 @@
this.SVG = {
- namespace: "http://www.w3.org/2000/svg",
- xlink: "http://www.w3.org/1999/xlink",
+ ns: 'http://www.w3.org/2000/svg',
+ xlink: 'http://www.w3.org/1999/xlink',
- createElement: function(e) {
- return document.createElementNS(this.namespace, e);
+ create: function(e) {
+ return document.createElementNS(this.ns, e);
}
+};
+
+this.svg = function(e) {
+ return new SVG.Document(e);
}; \ No newline at end of file