开发者

Need help to log the function body using firebug

开发者 https://www.devze.com 2022-12-27 07:40 出处:网络
When we use the console.log(someObject.someFunction) firebug shows function() string only. Is there a way i can see/log the code for the function in the console window ? Something similar to what we

When we use the console.log(someObject.someFunction) firebug shows function() string only.

Is there a way i can see/log the code for the function in the console window ? Something similar to what we can achie开发者_运维问答ve using alert(someObject.someFunction) shows the function body.


myFunction.toString()


Another solution :

console.log(myFunction + '');
0

精彩评论

暂无评论...
验证码 换一张
取 消