How I can get the Javascript's Global Object's (window object) properties apart from default properties, So that I would know that for a particular application, which variables have became (poluted the global scope) the global variables.
Object.getOwnPropertyNames(window);
This would give me all the properties of window object. So what I am interested in is filtering these properties and get only the properties that were not there initially in window object, in short getting the non-default properties.
Well of course, I can first get the properties of window object, store it in an array and then compare and filter with new (polluted) window object, but I wanted to know that is there any direct API (a method) that can give me the non-default properties.