To print all function defined in window in JavaScript,
use the following code:
for (var propertyName in this) {
var property = this[propertyName];
if (typeof(property) === 'function') {
console.log(property);
}
}
Reference:
http://stackoverflow.com/questions/152483/is-there-a-way-to-print-all-methods-of-an-object-in-javascript
No comments:
Post a Comment