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.

how view javascript method's contents console

  1. find function of interest in console
  2. right click word function
  3. click "show function definition"
  4. 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

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -