rem:  var preambles = d.query("> script[type='dojo/method'][event='preamble']", node).orphan(); if(preambles.length){  params.preamble = d.parser._functionFromScript(preambles[0]); 
add: if(!ps){  var preambles = d.query("> script[type='dojo/method'][event='preamble']", node).orphan(); if(preambles.length){  params.preamble = d.parser._functionFromScript(preambles[0]); }   var scripts = d.query("> script[type^='dojo/']", node).orphan(); 
context: 		d.forEach(nodes, function(node){			if(!node){ return; }			var type = node.getAttribute("dojoType");			if((!type)||(!type.length)){ return; }			var clsInfo = getClassInfo(type);			// read parameters (ie, attributes).			// clsInfo.params lists expected params like {"checked": "boolean", "n": "number"}			var params = {};			var attributes = node.attributes;			for(var name in clsInfo.params){				var item = attributes.getNamedItem(name);				if(!item || (!item.specified && (!dojo.isIE || name.toLowerCase()!="value"))){ continue; }				var _type = clsInfo.params[name];				params[name] = str2obj(item.value, _type);			}			// FIXME (perf): making two iterations of the DOM to find the			// <script> elements feels dirty. Still need a separate iteration			// if we do it another way, though, so we should probably benchmark			// the various approaches at some point.			// preambles are magic. Handle it.			var preambles = d.query("> script[type='dojo/method'][event='preamble']", node).orphan();			if(preambles.length){				// we only support one preamble. So be it.				params.preamble = d.parser._functionFromScript(preambles[0]);			}			// grab the rest of the scripts for processing later			var scripts = d.query("> script[type^='dojo/']", node).orphan();			var clazz = clsInfo.cls;			var markupFactory = clazz["markupFactory"];			if(!markupFactory && clazz["prototype"]){				markupFactory = clazz.prototype["markupFactory"];			}			// create the instance			var instance = markupFactory ? markupFactory(params, node, clazz) : new clazz(params, node);			thelist.push(instance);			// map it to the JS namespace if that makes sense			var jsname = node.getAttribute("jsId");			if(jsname){				d.setObject(jsname, instance);			}			// check to see if we need to hook up events for non-declare()-built classes			scripts.forEach(function(script){				d.parser._wireUpMethod(instance, script);			});		});
meta: 4497	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4497/1a3972bc3f84640f6d19672952306c5522186b72/parser.js/buggy/parser.js