Adding support for custom elements that derive from a native element (i.e. <button is="my-button">).

This commit is contained in:
Edwin van Rijkom 2014-11-12 16:19:10 +01:00
parent 289c02b882
commit bb9477313a

View file

@ -212,7 +212,7 @@ Mithril = m = new function app(window, undefined) {
else if (data.tag === "svg") namespace = "http://www.w3.org/2000/svg"
else if (data.tag === "math") namespace = "http://www.w3.org/1998/Math/MathML"
if (isNew) {
node = namespace === undefined ? window.document.createElement(data.tag) : window.document.createElementNS(namespace, data.tag)
node = namespace === undefined ? window.document.createElement(data.tag, data.attrs.is) : window.document.createElementNS(namespace, data.tag, data.attrs.is)
cached = {
tag: data.tag,
//set attributes first, then create children