diff --git a/mithril.js b/mithril.js index b2996cbf..908863a4 100644 --- a/mithril.js +++ b/mithril.js @@ -626,7 +626,7 @@ var _14 = function($window) { } else { removeNode(old, null) - insertNode(parent0, createNode(vnode, hooks, undefined), nextSibling) + insertNode(parent0, createNode(vnode, hooks, ns), nextSibling) } } function updateText(old, vnode) { diff --git a/mithril.min.js b/mithril.min.js index daac7489..63654ed1 100644 --- a/mithril.min.js +++ b/mithril.min.js @@ -1,44 +1,44 @@ -new function(){function u(c,f,n,g,k,h){return{tag:c,key:f,attrs:n,children:g,text:k,dom:h,domSize:void 0,state:{},events:void 0,instance:void 0,skip:!1}}function v(c){if(null==c||"string"!==typeof c&&null==c.view)throw Error("The selector must be either a string or a component.");if("string"===typeof c&&void 0===K[c]){for(var f,n,g=[],k={};f=R.exec(c);){var h=f[1],x=f[2];""===h&&""!==x?n=x:"#"===h?k.id=x:"."===h?g.push(x):"["===f[3][0]&&((h=f[6])&&(h=h.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")), -k[f[4]]=h||!0)}0e.filter(I).length)throw Error("Ensure that each item passed to m.prop.combine/m.prop.merge is a stream"); -return r(f(),e,function(){var m=e.filter(d);if(0e.indexOf("?")?"?":"&";e+=g+f}return e}function k(e){try{return""!==e?JSON.parse(e):null}catch(w){throw Error(e);}}function h(e){return e.responseText}function x(e,c){if("function"===typeof e)if(c instanceof Array)for(var f=0;fp.status||304===p.status)A(x(e.type,c));else{var f=Error(p.responseText),g;for(g in c)f[g]=c[g];A.error(f)}}catch(S){A.error(S)}"function"===typeof t&&t()}};l&&null!=e.data?p.send(e.data):p.send();return A},jsonp:function(e){var h=f();void 0!==e.initialValue&&h(e.initialValue);var l=e.callbackName||"_mithril_"+ -Math.round(1E16*Math.random())+"_"+z++,k=c.document.createElement("script");c[l]=function(f){k.parentNode.removeChild(k);h(x(e.type,f));"function"===typeof t&&t();delete c[l]};k.onerror=function(){k.parentNode.removeChild(k);h.error(Error("JSONP request failed"));"function"===typeof t&&t();delete c[l]};null==e.data&&(e.data={});e.url=n(e.url,e.data);e.data[e.callbackKey||"callback"]=l;k.src=g(e.url,e.data);c.document.documentElement.appendChild(k);return h},setCompletionCallback:function(e){t=e}}}(window, -P),M=function(){var c=[];return{subscribe:c.push.bind(c),unsubscribe:function(f){f=c.indexOf(f);-1e.filter(I).length)throw Error("Ensure that each item passed to m.prop.combine/m.prop.merge is a stream"); +return t(f(),e,function(){var l=e.filter(d);if(0e.indexOf("?")?"?":"&";e+=g+f}return e}function k(e){try{return""!==e?JSON.parse(e):null}catch(w){throw Error(e);}}function h(e){return e.responseText}function y(e,c){if("function"===typeof e)if(c instanceof Array)for(var f=0;fu.status||304===u.status)B(y(e.type,c));else{var f=Error(u.responseText),g;for(g in c)f[g]=c[g];B.error(f)}}catch(S){B.error(S)}"function"===typeof q&&q()}};m&&null!=e.data?u.send(e.data):u.send();return B},jsonp:function(e){var h=f();void 0!==e.initialValue&&h(e.initialValue);var m=e.callbackName||"_mithril_"+ +Math.round(1E16*Math.random())+"_"+A++,k=c.document.createElement("script");c[m]=function(f){k.parentNode.removeChild(k);h(y(e.type,f));"function"===typeof q&&q();delete c[m]};k.onerror=function(){k.parentNode.removeChild(k);h.error(Error("JSONP request failed"));"function"===typeof q&&q();delete c[m]};null==e.data&&(e.data={});e.url=n(e.url,e.data);e.data[e.callbackKey||"callback"]=m;k.src=g(e.url,e.data);c.document.documentElement.appendChild(k);return h},setCompletionCallback:function(e){q=e}}}(window, +P),M=function(){var c=[];return{subscribe:c.push.bind(c),unsubscribe:function(f){f=c.indexOf(f);-1=q&&k>=B;){var r=b[q],y=d[B];if(r!==y||m)if(null!=r&&null!=y&&r.key===y.key)q++,B++,h(a,r,y,c,z(b,q,e),m,g),m&&r.tag===y.tag&&t(a,x(r),e);else if(r= -b[l],r!==y||m)if(null!=r&&null!=y&&r.key===y.key)h(a,r,y,c,z(b,l+1,e),m,g),(m||B=q&&k>=B;){r=b[l];y=d[k];if(r!==y||m)if(null!=r&&null!=y&&r.key===y.key)h(a,r,y,c,z(b,l+1,e),m,g),m&&r.tag===y.tag&&t(a,x(r),e),null!=r.dom&&(e=r.dom),l--;else{if(!p){p=b;var r=l,u={},A;for(A=0;A=p&&x>=m;){var t=b[p],z=d[m];if(t!==z||l)if(null!=t&&null!=z&&t.key===z.key)p++,m++,h(a,t,z,c,A(b,p,e),l,g),l&&t.tag===z.tag&&q(a,y(t),e);else if(t= +b[k],t!==z||l)if(null!=t&&null!=z&&t.key===z.key)h(a,t,z,c,A(b,k+1,e),l,g),(l||m=p&&x>=m;){t=b[k];z=d[x];if(t!==z||l)if(null!=t&&null!=z&&t.key===z.key)h(a,t,z,c,A(b,k+1,e),l,g),l&&t.tag===z.tag&&q(a,y(t),e),null!=t.dom&&(e=t.dom),k--;else{if(!u){u=b;var t=k,r={},B;for(B=0;B