From: Thomas 'PointedEars' Lahn on
Jake Jarvis wrote:

> On 28.04.2010 13:43, wrote Thomas 'PointedEars' Lahn:
>> Andrew Poulos wrote:
>>> [http://PointedEars.de/es-matrix]
>>> IE 8 on Vista warns that
>> [...]
>>> Not implemented
>>> object.js, line 308 character 7
>>
>> Thank you. Apparently there is a problem with
>>
>> | if (typeof window != "undefined" && typeof window.onerror !=
>> | "undefined")
>> | {
>> | window.onerror = fHandler;
>> ^
>> | }
>>
>> that the feature test could not deal with.
>>
>> I am using this as a fallback mechanism for exceptions in
>> jsx.setErrorHandler(). Since this method is called from several others,
>> and I do not have Windows Vista to test with, could someone possibly
>> provide a stack trace, or more insight as to why the test would be passed
>> but the
>> assignment would not work, please? TIA.
>
> It's also erroring with "Nicht implementiert" (~ "not implemented") in
> Windows XP SP 3, IE 8.0.6001.18702 here.
>
> I'll try to copy the stack trace:
>
> | JScript anonymous function
>
> object.js line 308
>
> | JScript anonymous function
>
> refers to debug.js, line 50 `setErrorHandler();`
>
> | JScript global code
>
> So it appears you can not assign undefined to window.onerror in ie8
>
> the following [test case] also fails here

Thank you very much! That was the reason, indeed. Although I am setting a
default value if `fError' is (supposedly) not a method, the newly introduced
closure and namespaces change everything as jsx.clearErrorHandler() is not
yet defined when setErrorHandler() is being defined.

var setErrorHandler = jsx.setErrorHandler = (function () {
var
jsx_object = jsx.object,
jsx_clearErrorHandler = jsx.clearErrorHandler;

return function (fHandler) {
// ...

if (!jsx_object.isMethod(fHandler))
{
fHandler = jsx_clearErrorHandler;
}

if (typeof window != "undefined"
&& typeof window.onerror != "undefined")
{
// ...
window.onerror = fHandler;
}

return (typeof window.onerror != "undefined"
&& window.onerror == fHandler);
};
}());

var clearErrorHandler = jsx.clearErrorHandler = function () {
// ...
};

That was also the reason why I was getting this runtime error in Wine-IE 6
(from IEs4Linux), which I previously attributed to a quirk in the new
wine-unstable:

| Line: 419
| Char: 7
| Error: Could not complete the operation due to error 80004001
| Code: 0
| URL: http://[...]/scripts/test/es-matrix

After reversing the order of the declarations, the problem is gone here :)

With clean browser cache, does anyone still observe problems in IE?


\\//, Live long and prosper

PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7(a)news.demon.co.uk> (2004)