?

Log in

Dojo Bugfixes - Nothing Is True
Question Yourself

Christopher Parker
Date: 2008-08-20 16:15
Subject: Dojo Bugfixes
Security: Public
Tags:code, dojo, javascript, programming, web
I've had to make the following changes in Dojo Release 1.1.1 in order to get Dojo to work in both IE and Firefox:

/dojox/data/dom.js:

Line 37:
	/* CCP: Bugfix: mimetype of "text/xml; charset=UTF-8" set by the server causes DOMParser.parseFromString to fail with the following error:
		uncaught exception: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMParser.parseFromString]"  nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"  location: "JS frame :: http://www.example.com/scripts/dojo111/dojo/dojo.js.uncompressed.js :: anonymous :: line 495"  data: no]
		
		Line 0
	*/
	if(!mimetype){ mimetype = "text/xml"; }
	else if (mimetype.indexOf(';') != -1) { mimetype = mimetype.substring(0, mimetype.indexOf(';')); }


/dojox/io/proxy/xip.js:

Line 63:
		var url = this.xipClientUrl + ""; // CCP: Bugfix: url is not a string in original version, so url.split fails.


Line 388:
	// CCP: Bugfix: iframeProxyUrl: "../xip_server.html" does not work in original version.
	//Make xip_server a full URL.
	var colonIndex = ifpServerUrl.indexOf(":");
	var slashIndex = ifpServerUrl.indexOf("/");
	if(colonIndex == -1 || slashIndex < colonIndex){
		//No colon or we are starting with a / before a colon, so we need to make a full URL.
		var loc = window.location.href;
		if(slashIndex == 0){
			//Have a full path, just need the domain.
			ifpServerUrl = loc.substring(0, loc.indexOf("/", 9)) + ifpServerUrl; //Using 9 to get past http(s)://
		}else{
			ifpServerUrl = loc.substring(0, (loc.lastIndexOf("/") + 1)) + ifpServerUrl;
		}
	}


/dojo/dojo.js.uncompressed.js:

Line 152:
		if(typeof console[tn] == "undefined"){


Line 7432:
			dfd.cancel(e);


My favorite Dojo source comment quote: "IE 6 is a steaming pile," Line 7408, dojo.js.uncompressed.js. Amen.
Post A Comment | Share | Link






browse
my journal
links
November 2008