문제

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?

도움이 되었습니까?

해결책

Just write in console function.toString(). Example:

alert.toString() will output:

"function alert() {
    [native code]
}"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top