Merge pull request #91 from pistolero/master
Added support for overriding xml namespace.
This commit is contained in:
commit
d4cb7959d4
2 changed files with 7 additions and 3 deletions
|
|
@ -66,7 +66,8 @@ Mithril = m = new function app(window) {
|
|||
if (typeof data.tag != "string") return
|
||||
|
||||
var node, isNew = cached.nodes.length === 0
|
||||
if (data.tag === "svg") namespace = "http://www.w3.org/2000/svg"
|
||||
if (data.attrs.xmlns) namespace = data.attrs.xmlns
|
||||
else if (data.tag === "svg") namespace = "http://www.w3.org/2000/svg"
|
||||
if (isNew) {
|
||||
node = namespace === undefined ? window.document.createElement(data.tag) : window.document.createElementNS(namespace, data.tag)
|
||||
cached = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue