View a Javascript method's contents in Chrome console -
when console.log object in chrome, see properties , method name, can't see contents of method itself. how can view contents of object's method?
i've created jsfiddle may explain i'm looking for.

- find function of interest in console
- right click word
function - click "show function definition"
- function displayed in sources tab
alternatively, log result of
function.prototype.tostring.call(someobj.methodone) /* function (e) { return 'e ' + e; } */ a third choice double click on word function expands function in edit box, don't method because it's misleading - can't make changes typed keys change contents of box , other logging activity cause lose focus
Comments
Post a Comment