When I assign console.log
to a variable in node.js it works fine,
var l = console.log
l(1) # outputs 1
However, if I do the same thing in Chromium 30's dev tools,
var l = console.log
l(1) # TypeError: Illegal invocation
How come it doesn't work in Chromium's dev tools? Why am I getting,
TypeError: Illegal invocation