From 8ecb370e95d70eca98cd6dee1c8126a8fe89290c Mon Sep 17 00:00:00 2001 From: Gandalf-the-Bot Date: Wed, 23 Nov 2016 06:43:47 +0000 Subject: [PATCH] Bundled output for commit e4ba0318d6ce139fcf9b44271fe3e3449a231f55 [skip ci] --- README.md | 2 +- mithril.js | 1 + mithril.min.js | 76 +++++++++++++++++++++++++------------------------- 3 files changed, 40 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 065fb6b6..71c22280 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,6 @@ There are over 4000 assertions in the test suite, and tests cover even difficult ## Modularity -Despite the huge improvements in performance and modularity, the new codebase is smaller than v0.2.x, currently clocking at 7.38 KB min+gzip +Despite the huge improvements in performance and modularity, the new codebase is smaller than v0.2.x, currently clocking at 7.41 KB min+gzip In addition, Mithril is now completely modular: you can import only the modules that you need and easily integrate 3rd party modules if you wish to use a different library for routing, ajax, and even rendering diff --git a/mithril.js b/mithril.js index 650de6ae..68a0cb07 100644 --- a/mithril.js +++ b/mithril.js @@ -244,6 +244,7 @@ var _8 = function($window, Promise) { if (args.deserialize === deserialize) { xhr.setRequestHeader("Accept", "application/json, text/*") } + if (args.withCredentials) xhr.withCredentials = args.withCredentials if (typeof args.config === "function") xhr = args.config(xhr, args) || xhr xhr.onreadystatechange = function() { if (xhr.readyState === 4) { diff --git a/mithril.min.js b/mithril.min.js index a84c8be2..71078381 100644 --- a/mithril.min.js +++ b/mithril.min.js @@ -1,40 +1,40 @@ -new function(){function l(a,b,k,e,n,h){return{tag:a,key:b,attrs:k,children:e,text:n,dom:h,domSize:void 0,state:{},events:void 0,instance:void 0,skip:!1}}function t(a){if(null==a||"string"!==typeof a&&null==a.view)throw Error("The selector must be either a string or a component.");if("string"===typeof a&&void 0===G[a]){for(var b,k,e=[],n={};b=N.exec(a);){var h=b[1],v=b[2];""===h&&""!==v?k=v:"#"===h?n.id=v:"."===h?e.push(v):"["===b[3][0]&&((h=b[6])&&(h=h.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")), -"class"===b[4]?e.push(h):n[b[4]]=h||!0)}0a.indexOf("?")?"?":"&";a+=e+f}return a}function v(a){try{return""!== -a?JSON.parse(a):null}catch(x){throw Error(a);}}function q(a){return a.responseText}function r(a,b){if("function"===typeof a)if(b instanceof Array)for(var e=0;ea.indexOf("?")?"?":"&";a+=d+f}return a}function v(a){try{return""!== +a?JSON.parse(a):null}catch(x){throw Error(a);}}function q(a){return a.responseText}function r(a,b){if("function"===typeof a)if(b instanceof Array)for(var d=0;dm.status||304===m.status)b(r(f.type,a));else{var h=Error(m.responseText),k;for(k in a)h[k]=a[k];e(h)}}catch(F){e(F)}};p&&null!=f.data?m.send(f.data):m.send()}))}, -jsonp:function(f){return e(new b(function(b,e){var m=f.callbackName||"_mithril_"+Math.round(1E16*Math.random())+"_"+l++,k=a.document.createElement("script");a[m]=function(e){k.parentNode.removeChild(k);b(r(f.type,e));delete a[m]};k.onerror=function(){k.parentNode.removeChild(k);e(Error("JSONP request failed"));delete a[m]};null==f.data&&(f.data={});f.url=n(f.url,f.data);f.data[f.callbackKey||"callback"]=m;k.src=h(f.url,f.data);a.document.documentElement.appendChild(k)}))},setCompletionCallback:function(a){w= -a}}}(window,"undefined"!==typeof Promise?Promise:z),I=function(){var a=[];return{subscribe:a.push.bind(a),unsubscribe:function(b){b=a.indexOf(b);-1=u&&B>=n;){var y=a[u],l=d[n];if(y!==l||g)if(null!=y&&null!=l&&y.key===l.key)u++,n++,h(c,y,l,e,q(a,u,f),g, -m),g&&y.tag===l.tag&&r(c,v(y),f);else if(y=a[w],y!==l||g)if(null!=y&&null!=l&&y.key===l.key)h(c,y,l,e,q(a,w+1,f),g,m),(g||n=u&&B>=n;){y=a[w];l=d[B];if(y!==l||g)if(null!=y&&null!=l&&y.key===l.key)h(c,y,l,e,q(a,w+1,f),g,m),g&&y.tag===l.tag&&r(c,v(y),f),null!=y.dom&&(f=y.dom),w--;else{if(!x){x=a;var y=w,D={},A;for(A=0;Am.status||304===m.status)b(r(f.type,a));else{var h=Error(m.responseText),k;for(k in a)h[k]=a[k];d(h)}}catch(F){d(F)}}; +p&&null!=f.data?m.send(f.data):m.send()}))},jsonp:function(f){return d(new b(function(b,d){var m=f.callbackName||"_mithril_"+Math.round(1E16*Math.random())+"_"+l++,k=a.document.createElement("script");a[m]=function(d){k.parentNode.removeChild(k);b(r(f.type,d));delete a[m]};k.onerror=function(){k.parentNode.removeChild(k);d(Error("JSONP request failed"));delete a[m]};null==f.data&&(f.data={});f.url=n(f.url,f.data);f.data[f.callbackKey||"callback"]=m;k.src=h(f.url,f.data);a.document.documentElement.appendChild(k)}))}, +setCompletionCallback:function(a){w=a}}}(window,"undefined"!==typeof Promise?Promise:z),I=function(){var a=[];return{subscribe:a.push.bind(a),unsubscribe:function(b){b=a.indexOf(b);-1=u&&B>=n;){var y=a[u],l=e[n];if(y!==l||g)if(null!=y&&null!=l&&y.key===l.key)u++,n++,h(c,y,l,f,q(a,u,d),g, +m),g&&y.tag===l.tag&&r(c,v(y),d);else if(y=a[w],y!==l||g)if(null!=y&&null!=l&&y.key===l.key)h(c,y,l,f,q(a,w+1,d),g,m),(g||n=u&&B>=n;){y=a[w];l=e[B];if(y!==l||g)if(null!=y&&null!=l&&y.key===l.key)h(c,y,l,f,q(a,w+1,d),g,m),g&&y.tag===l.tag&&r(c,v(y),d),null!=y.dom&&(d=y.dom),w--;else{if(!x){x=a;var y=w,D={},A;for(A=0;A