aboutsummaryrefslogtreecommitdiffstats
path: root/src/svg.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2012-12-29 18:12:53 +0100
committerwout <wout@impinc.co.uk>2012-12-29 18:12:53 +0100
commit68367e494fcab754ae4833e64804a824032cf31c (patch)
treec9d5d9fe5995ccbbe819f29752c1133c7415882d /src/svg.js
parent52ed3ba98715ed3c63e74ff29a9892972a7bec19 (diff)
downloadsvg.js-68367e494fcab754ae4833e64804a824032cf31c.tar.gz
svg.js-68367e494fcab754ae4833e64804a824032cf31c.zip
Code refactoring
Diffstat (limited to 'src/svg.js')
-rw-r--r--src/svg.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/svg.js b/src/svg.js
index 876b9aa..fd5f967 100644
--- a/src/svg.js
+++ b/src/svg.js
@@ -1,12 +1,15 @@
this.SVG = {
+ // define default namespaces
ns: 'http://www.w3.org/2000/svg',
xlink: 'http://www.w3.org/1999/xlink',
+ // method for element creation
create: function(e) {
return document.createElementNS(this.ns, e);
},
+ // method for extending objects
extend: function(o, m) {
for (var k in m)
o.prototype[k] = m[k];