aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-12-01 13:32:23 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-12-01 13:32:23 +0100
commit637039fbde6a68f18f89ce8677f6b8ca667ba689 (patch)
tree25538f2650623b9636958119d0a169c9780f5ae2 /src
parent998b422fa24c4f45b0265779cdf4d0833788040a (diff)
downloadsvg.js-637039fbde6a68f18f89ce8677f6b8ca667ba689.tar.gz
svg.js-637039fbde6a68f18f89ce8677f6b8ca667ba689.zip
dont generate esm bundle anymore and link to src/main.js directly. Move bower to its own repo
rename makeNode back to create
Diffstat (limited to 'src')
-rw-r--r--src/elements/Dom.js4
-rw-r--r--src/utils/adopter.js6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/elements/Dom.js b/src/elements/Dom.js
index f6e72c9..fa4ed08 100644
--- a/src/elements/Dom.js
+++ b/src/elements/Dom.js
@@ -4,7 +4,7 @@ import {
eid,
extend,
makeInstance,
- makeNode,
+ create,
register
} from '../utils/adopter.js'
import { find } from '../modules/core/selector.js'
@@ -90,7 +90,7 @@ export default class Dom extends EventTarget {
}
element (nodeName) {
- return this.put(new Dom(makeNode(nodeName)))
+ return this.put(new Dom(create(nodeName)))
}
// Get first child
diff --git a/src/utils/adopter.js b/src/utils/adopter.js
index a826607..4f50ca0 100644
--- a/src/utils/adopter.js
+++ b/src/utils/adopter.js
@@ -8,7 +8,7 @@ const elements = {}
export const root = '___SYMBOL___ROOT___'
// Method for element creation
-export function makeNode (name) {
+export function create (name) {
// create element
return globals.document.createElementNS(ns, name)
}
@@ -28,7 +28,7 @@ export function makeInstance (element) {
return adopter(globals.document.querySelector(element))
}
- var node = makeNode('svg')
+ var node = create('svg')
node.innerHTML = element
// We can use firstChild here because we know,
@@ -39,7 +39,7 @@ export function makeInstance (element) {
}
export function nodeOrNew (name, node) {
- return node instanceof globals.window.Node ? node : makeNode(name)
+ return node instanceof globals.window.Node ? node : create(name)
}
// Adopt existing svg elements