rem: Freja.AssetManager.loadAsset = function(url, onload, onerror) { 
add: Freja.AssetManager.loadAsset = function(url, preventCaching, onload, onerror) { 
context: Freja.AssetManager.loadAsset = function(url, onload, onerror) {	var match = /^(file:\/\/.*\/)([^/]*)$/.exec(window.location.href);	if (match) {		url = match[1] + url; // local	}	var callback = function(transport) {		try {			if (transport.responseText != "" && transport.responseXML.xml == "") {				// The server doesn't reply with Content-Type: text/xml				// this will happen if the file is loaded locally (through file://)				var document = (new DOMParser()).parseFromString(transport.responseText, "text/xml");			} else {				var document = transport.responseXML;			}		} catch (ex) {			if (onerror) {				onerror(ex);			}			throw ex;		}		onload(document);	}	try {		var req = new XMLHttpRequest();		if (Freja.AssetManager.HTTP_METHOD_TUNNEL) {			req.open("POST", url, Freja.AssetManager.HTTP_REQUEST_TYPE == "async");			req.setRequestHeader(Freja.AssetManager.HTTP_METHOD_TUNNEL, "GET");			req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		} else {			req.open("GET", url, Freja.AssetManager.HTTP_REQUEST_TYPE == "async");		}//		req.open("GET", url, this.HTTP_REQUEST_TYPE == "async");		var d = MochiKit.Async.sendXMLHttpRequest(req).addCallbacks(callback, onerror);		return d;	} catch (ex) {		if (onerror) {			onerror(ex);		}		throw ex;	}}
meta: 8607	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8607/21d003268f60cdcda530e48a74631d4e317ba66c/Freja.js/buggy/trunk/lib/Freja.js