Reputation: 7419
In chrome, when you type a function in the console, the source code for that function is outputted. For example
> $.rails.confirm
function (message) {
return confirm(message);
}
But in firefox inspector's console, it just outputs
[object Function]
How do I see a function's source code in Firefox inspector, like in chrome?
Upvotes: 0
Views: 892
Reputation: 120
Just write in console function.toString(). Example:
alert.toString() will output:
"function alert() {
[native code]
}"
Upvotes: 2