I have a question about code in ajax.js that is crashing for me in both FF and IE.
The code below starts on line 453 of th ajax.js module. -- (Note: In the released build this line ended-up at line number 4983 of jquery-1.4.js)
My questions are
1) Why the try {} around the function definition?
2) My crash is in the function at runtime, thus apparently not caught by the try{}
The offending line is #461
(461) xhr.readyState = 0;
The error as reported by the FireBug console: "setting a property that has only a getter".
All this smells fishy to me. Anyone have insight to share? When I comment-out that line everything works perfectly.
Here is a clip of the code in ajax.js starting at line #453
(453) // Override the abort handler, if we can (IE doesn't allow it, but that's OK)
// Opera doesn't fire onreadystatechange at all on abort
try {
var oldAbort = xhr.abort;
xhr.abort = function() {
if ( xhr ) {
oldAbort.call( xhr );
if ( xhr ) {
xhr.readyState = 0; // Boom!
}
}
onreadystatechange();
};
} catch(e) { }
**--** Steve