From 5f2c9a3a29caec82abb943a48fabd4e25b8d3c9b Mon Sep 17 00:00:00 2001 From: Gandalf-the-Bot Date: Tue, 16 Aug 2016 12:30:45 +0000 Subject: [PATCH 1/3] Bundled output for commit ca4c91a3d3247aac47e28af4cf57bb99143b6f93 [skip ci] --- mithril.min.js | 82 +++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/mithril.min.js b/mithril.min.js index 856b9f6c..9e9ab97a 100644 --- a/mithril.min.js +++ b/mithril.min.js @@ -1,41 +1,41 @@ -new function(){function w(b,e,p,f,k,h){return{tag:b,key:e,attrs:p,children:f,text:k,dom:h,domSize:void 0,state:{},events:void 0,instance:void 0}}var u=console.error.bind(console),L=function(b){function e(){function a(){0=l&&A>=k;){var y=a[l],q=d[k];if(y===q)l++,k++;else if(null!=y&&null!=q&&y.key===q.key)l++,k++,h(c,y,q,b,t(a,l,g),m,f),m&&y.tag===q.tag&&r(c,n(y),g);else if(y=a[z],y===q)z--,k++;else if(null!=y&&null!=q&&y.key===q.key)h(c,y,q,b,t(a,z+1,g),m,f),k=l&&A>=k;){y=a[z];q=d[A];if(y===q)z--; -else if(null!=y&&null!=q&&y.key===q.key)h(c,y,q,b,t(a,z+1,g),m,f),m&&y.tag===q.tag&&r(c,n(y),g),null!=y.dom&&(g=y.dom),z--;else{if(!w){w=a;var y=z,v={},u;for(u=0;ub.indexOf("?")?"?":"&";b+=m+f}return b}function k(b){try{return""!==b?JSON.parse(b):null}catch(e){throw Error(b);}}function h(b){return b.responseText}function n(b,e){if("function"===typeof b)if(e instanceof Array)for(var f=0;fm.status)e(n(g.type,b));else{var f=Error(m.responseText),r;for(r in b)f[r]=b[r];e.error(f)}}catch(k){e.error(k)}"function"===typeof x&&x()}};r?m.send(g.data):m.send();return e},jsonp:function(e){var l=t.stream();void 0!==e.initialValue&&l(e.initialValue);var k=e.callbackName||"_mithril_"+Math.round(1E16*Math.random())+"_"+r++,m=b.document.createElement("script");b[k]=function(f){m.parentNode.removeChild(m);l(n(e.type,f));"function"===typeof x&&x();delete b[k]};m.onerror= -function(){m.parentNode.removeChild(m);l.error(Error("JSONP request failed"));"function"===typeof x&&x();delete b[k]};null==e.data&&(e.data={});e.url=p(e.url,e.data);e.data[e.callbackKey||"callback"]=k;m.src=f(e.url,e.data);b.document.documentElement.appendChild(m);return l},setCompletionCallback:function(b){x=b}}}(window,u),G=function(){var b=[];return{subscribe:b.push.bind(b),unsubscribe:function(e){e=b.indexOf(e);-1=l&&z>=k;){var w=a[l],n=d[k];if(w===n)l++,k++;else if(null!=w&&null!=n&&w.key===n.key)l++,k++,h(c,w,n,b,r(a,l,g),m,f),m&&w.tag===n.tag&&q(c,p(w),g);else if(w=a[y],w===n)y--,k++;else if(null!=w&&null!=n&&w.key===n.key)h(c,w,n,b,r(a,y+1,g),m,f),k=l&&z>=k;){w=a[y];n=d[z];if(w===n)y--;else if(null!=w&&null!=n&&w.key===n.key)h(c,w,n,b,r(a,y+1,g),m,f),m&&w.tag===n.tag&&q(c,p(w),g),null!=w.dom&&(g=w.dom),y--;else{if(!t){t=a;var w=y,u={},A;for(A=0;Ab.indexOf("?")?"?":"&";b+=m+f}return b}function k(b){try{return""!==b?JSON.parse(b):null}catch(e){throw Error(b);}}function h(b){return b.responseText}function p(b,e){if("function"===typeof b)if(e instanceof Array)for(var f=0;fm.status)e(p(g.type,b));else{var f=Error(m.responseText),q;for(q in b)f[q]=b[q];e.error(f)}}catch(k){e.error(k)}"function"===typeof v&&v()}};q?m.send(g.data):m.send();return e},jsonp:function(e){var l=r.stream();void 0!==e.initialValue&&l(e.initialValue);var k=e.callbackName||"_mithril_"+Math.round(1E16*Math.random())+"_"+q++,m=b.document.createElement("script");b[k]=function(f){m.parentNode.removeChild(m);l(p(e.type,f));"function"=== +typeof v&&v();delete b[k]};m.onerror=function(){m.parentNode.removeChild(m);l.error(Error("JSONP request failed"));"function"===typeof v&&v();delete b[k]};null==e.data&&(e.data={});e.url=n(e.url,e.data);e.data[e.callbackKey||"callback"]=k;m.src=f(e.url,e.data);b.document.documentElement.appendChild(m);return l},setCompletionCallback:function(b){v=b}}}(window,A),E=function(){var b=[];return{subscribe:b.push.bind(b),unsubscribe:function(e){e=b.indexOf(e);-1 Date: Tue, 16 Aug 2016 22:56:42 +0200 Subject: [PATCH 2/3] Add a static `vnode.skip` field --- render/render.js | 2 +- render/vnode.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/render/render.js b/render/render.js index 13bb402b..f0fad6a1 100644 --- a/render/render.js +++ b/render/render.js @@ -326,7 +326,7 @@ module.exports = function($window) { for (var i = start; i < end; i++) { var vnode = vnodes[i] if (vnode != null) { - if (vnode.skip) vnode.skip = undefined + if (vnode.skip) vnode.skip = false else removeNode(parent, vnode, context, false) } } diff --git a/render/vnode.js b/render/vnode.js index 7c0d5ce8..343e39b5 100644 --- a/render/vnode.js +++ b/render/vnode.js @@ -1,5 +1,5 @@ function Vnode(tag, key, attrs, children, text, dom) { - return {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: {}, events: undefined, instance: undefined} + return {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: {}, events: undefined, instance: undefined, skip: false} } Vnode.normalize = function(node) { if (node instanceof Array) return Vnode("[", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined) From 5cf616515d0ebeba410e0ccf8c26e882ea7d35fc Mon Sep 17 00:00:00 2001 From: Gandalf-the-Bot Date: Tue, 16 Aug 2016 21:11:34 +0000 Subject: [PATCH 3/3] Bundled output for commit 67744f485676db02f54c35d7ca560a35d807d3f9 [skip ci] --- mithril.js | 4 ++-- mithril.min.js | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mithril.js b/mithril.js index 6f293f48..681832eb 100644 --- a/mithril.js +++ b/mithril.js @@ -193,7 +193,7 @@ defaultStream.reject = Stream.reject defaultStream.merge = Stream.merge defaultStream.HALT = Stream.HALT function Vnode(tag, key, attrs, children, text, dom) { - return {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: {}, events: undefined, instance: undefined} + return {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: {}, events: undefined, instance: undefined, skip: false} } Vnode.normalize = function(node) { if (node instanceof Array) return Vnode("[", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined) @@ -577,7 +577,7 @@ var renderService = function($window) { for (var i = start; i < end; i++) { var vnode = vnodes[i] if (vnode != null) { - if (vnode.skip) vnode.skip = undefined + if (vnode.skip) vnode.skip = false else removeNode(parent, vnode, context, false) } } diff --git a/mithril.min.js b/mithril.min.js index 9e9ab97a..6d9f2e23 100644 --- a/mithril.min.js +++ b/mithril.min.js @@ -1,9 +1,9 @@ -new function(){function n(b,e,B,f,k,h){return{tag:b,key:e,attrs:B,children:f,text:k,dom:h,domSize:void 0,state:{},events:void 0,instance:void 0}}var A=console.error.bind(console),A=console.error.bind(console),K=function(b){function e(){function a(){0