Fix for flatten in Firefox (silly security restriction makes onreadystatechange not readable)

This commit is contained in:
Tom Robinson authored and Francisco Ryan Tolmasky I committed 2010-03-28 15:04:41 -07:00
1 parent 9cb7951624
commit 32605ccd12
1 file changed
+7 -2
+7 -2
View File
@@ -199,9 +199,14 @@ CFHTTPRequest.prototype.overrideMimeType = function(/*String*/ aMimeType)
CFHTTPRequest.prototype.open = function(/*String*/ method, /*String*/ url, /*Boolean*/ async, /*String*/ user, /*String*/ password)
{
var cachedRequest = CFHTTPRequest._lookupCachedRequest(url);
if (cachedRequest) {
cachedRequest.onreadystatechange = this._nativeRequest.onreadystatechange;
if (cachedRequest)
{
var self = this;
this._nativeRequest = cachedRequest;
this._nativeRequest.onreadystatechange = function()
{
determineAndDispatchHTTPRequestEvents(self);
};
}
return this._nativeRequest.open(method, url, async, user, password);
}