示例#1
0
(function(a){var l=a.Loader,k=a.UA,h=l.Utils;a.augment(l,l.Target,{__currentMod:null,__startLoadTime:0,__startLoadModName:null,add:function(c,b,g){var i=this.runtime;if("string"==typeof c)h.registerModule(i,c,b,g);else if(a.isFunction(c))if(g=b,b=c,k.ie){var c=a.Env.host.document.getElementsByTagName("script"),l,d,o;for(d=c.length-1;0<=d;d--)if(o=c[d],"interactive"==o.readyState){l=o;break}c=l?l.getAttribute("data-mod-name"):this.__startLoadModName;h.registerModule(i,c,b,g);this.__startLoadModName=
null;this.__startLoadTime=0}else this.__currentMod={fn:b,config:g}}})})(KISSY);
示例#2
0
(function(a){function j(){var c=/^(.*)(seed|kissy)(?:-min)?\.js[^/]*/i,d=/(seed|kissy)(?:-min)?\.js/i,i,l,g=a.Env.host.document.getElementsByTagName("script"),j=g[g.length-1],g=h.resolveByPage(j.src).toString(),j=(j=j.getAttribute("data-config"))?(new Function("return "+j))():{},g=g.replace(/%3f/gi,"?").replace(/%2c/gi,",");i=j.comboPrefix=j.comboPrefix||"??";l=j.comboSep=j.comboSep||",";var p,f=g.indexOf(i);-1==f?p=g.replace(c,"$1"):(p=g.substring(0,f),g=g.substring(f+i.length).split(l),a.each(g,
function(a){if(a.match(d))return p+=a.replace(c,"$1"),!1}));return a.mix({base:p,baseUri:new a.Uri(p)},j)}var l=a.Loader,h=l.Utils,d=a.Loader.Combo;a.mix(a,{add:function(a,d,h){this.getLoader().add(a,d,h)},use:function(a,d){this.getLoader().use(a,d)},getLoader:function(){var c=this.Env;return this.Config.combine&&!a.Env.nodejs?c._comboLoader:c._loader},clearLoader:function(){var a=this.Env,d;(d=a._comboLoader)&&d.clear&&d.clear();(d=a._loader)&&d.clear&&d.clear();this.config({map:!1,mapCombo:!1,modules:!1,