Skip to content

Instantly share code, notes, and snippets.

@Daniel15
Created May 29, 2012 10:54
Show Gist options
  • Save Daniel15/2826819 to your computer and use it in GitHub Desktop.
Save Daniel15/2826819 to your computer and use it in GitHub Desktop.
Internet Explorer's console.log is not actually a function.
>> document.getElementById
function getElementById() { [native code] }
>> document.getElementById instanceof Function
true
>> document.getElementById.apply
function apply() { [native code] }
>> typeof(document.getElementById)
"function"
>> console.log
function log() { [native code] }
>> console.log instanceof Function
false
>> console.log.apply(console, [123456])
"Object doesn't support property or method 'apply'"
>> console.log.call(console, 123456)
"Object doesn't support property or method 'call'"
>> typeof(console.log)
"object"
>> typeof(console)
"object"
>> console.log instanceof ActiveXObject
false
>> console instanceof ActiveXObject
false
>> document.getElementById.toString()
"
function getElementById() {
[native code]
}
"
>> console.log.toString()
"Object doesn't support property or method 'toString'"
>> console.toString()
"Object doesn't support property or method 'toString'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment