host-object

Is it possible to show only User Defined Functions & Properties in Google Chrome's console?

梦想的初衷 提交于 2019-12-07 13:29:07
问题 In Firebug you can set the output of the DOM tab to only show user defined functions and properties. This is helpful for checking if you have objects escaping into the global namespace. Is there an equivalent in Chrome? 回答1: Here's a close approximation: Console version: var current; for(current in window) { /* If the property is not null or undefined */ if (!!window[current] ) { /* If the constructor is the Function object */ if (/Function/.test(String(window[current].constructor) ) ) { /*