When I execute the following code in Chrome 18 beta I get the error:
console.log.apply(this, ['message']);
TypeError: Illegal invocation.
In Firefox 10 it works as expected.
In IE9 I get the error: Object doesn't support property or method 'apply'
.
I'm guessing this has to do with how the browser has implemented console.log
.
Why does it work in Firefox but not in Chrome and IE? I'm hoping someone can shed some light on the cause of this and its ramifications.
Here is an executable sample on JS Bin.