lib/har/viewer/scripts/domplate/domplate.js in har-0.1.0 vs lib/har/viewer/scripts/domplate/domplate.js in har-0.1.1

- old
+ new

@@ -1,7 +1,7 @@ -require.def("domplate/domplate",[],function(){Domplate={};(function(){function DomplateTag(tagName) +define("domplate/domplate",[],function(){Domplate={};(function(){function DomplateTag(tagName) {this.tagName=tagName;} this.DomplateTag=DomplateTag;function DomplateEmbed() {} function DomplateLoop() {} @@ -21,11 +21,11 @@ this.context=domplate.topContext;if(args.length) parseChildren(args,hasAttrs?1:0,this.vars,this.children);if(hasAttrs) this.parseAttrs(attrs);return creator(this,DomplateTag);},parseAttrs:function(args) {for(var name in args) {var val=parseValue(args[name]);readPartNames(val,this.vars);if(name.indexOf("on")==0) -{var eventName=$.browser.msie?name:name.substr(2);if(!this.listeners) +{var eventName=name.substr(2);if(!this.listeners) this.listeners=[];this.listeners.push(eventName,val);} else if(name.indexOf("_")==0) {var propName=name.substr(1);if(!this.props) this.props={};this.props[propName]=val;} else if(name.indexOf("$")==0) @@ -55,11 +55,11 @@ {while(1) {var value=iter.next();var itemOuts=[0,0];iterOuts.push(itemOuts);fn.apply(this,[value,itemOuts]);}} catch(exc) {if(exc!=StopIteration) throw exc;}} -var js=$.browser.msie?'var f = '+fnBlock.join("")+';f':fnBlock.join("");this.renderMarkup=eval(js);},getVarNames:function(args) +var js=fnBlock.join("");this.renderMarkup=eval(js);},getVarNames:function(args) {if(this.vars) args.push.apply(args,this.vars);for(var i=0;i<this.children.length;++i) {var child=this.children[i];if(isTag(child)) child.tag.getVarNames(args);else if(child instanceof Parts) {for(var i=0;i<child.parts.length;++i) @@ -113,16 +113,14 @@ {var index=arguments[i];if(i==3) index+=offset;if(index==-1) parent=parent.parentNode;else parent=parent.childNodes[index];} return parent;} -var js=$.browser.msie?'var f = '+fnBlock.join("")+';f':fnBlock.join("");this.renderDOM=eval(js);},generateDOM:function(path,blocks,args) +var js=fnBlock.join("");this.renderDOM=eval(js);},generateDOM:function(path,blocks,args) {if(this.listeners||this.props) this.generateNodePath(path,blocks);if(this.listeners) {for(var i=0;i<this.listeners.length;i+=2) -{var val=this.listeners[i+1];var arg=generateArg(val,path,args);if($.browser.msie) -blocks.push('node.attachEvent("',this.listeners[i],'", __bind__(this, ',arg,'));\n');else -blocks.push('node.addEventListener("',this.listeners[i],'", __bind__(this, ',arg,'), false);\n');}} +{var val=this.listeners[i+1];var arg=generateArg(val,path,args);blocks.push('node.addEventListener("',this.listeners[i],'", __bind__(this, ',arg,'), false);\n');}} if(this.props) {for(var name in this.props) {var val=this.props[name];var arg=generateArg(val,path,args);blocks.push("__prop__(node, '"+name+"', "+arg+");\n");}} this.generateChildDOM(path,blocks,args);return 1;},generateNodePath:function(path,blocks) {blocks.push("var node = __path__(root, o");for(var i=0;i<path.length;++i) \ No newline at end of file