From 6a013f19d6fa84e538d31bca5f1466c5f3479630 Mon Sep 17 00:00:00 2001 From: wout Date: Mon, 17 Dec 2012 16:55:16 +0100 Subject: Refactored code for readability and size --- src/svg.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/svg.js') 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 -- cgit v1.2.3