"Object doesn't support this action" JavaScript error in IE 11 when in IE 8...
Brought to you by:
timdown
Hello,
The attached bug.html file, when dropped into the root of the log4javascript 1.4.10 release, gives a JavaScript error like:
SCRIPT445: Object doesn't support this action File: log4javascript_uncompressed.js, Line: 1880, Column: 4
in Internet Explorer 11 when the F12 Developer Tools are used to put it into IE 8 compatibility mode. (Sorry, haven't tried it using actual IE 8, but I assume it would be a problem there, too.)
This sounds similar to problems that others have encountered:
- https://github.com/emberjs/ember.js/issues/3970
- http://stackoverflow.com/a/6875494
Changing line 1880 of js/log4javascript_uncompressed.js to be:
if ('undefined' === typeof console[consoleMethodName].apply) {
instead did appear to fix it under IE 11 in IE 8 compatibility mode. Limited testing suggested it still worked fine in at least Chrome and Firefox.
A screenshot showing the error as reported by the IE 11 dev tools.
Same here, but you need to rather write the following to use the best possible way to display messages.
Thanks for this. I've made a fix and released a new version.
thanks for fixing this that fast!