Javascript Global Object (window object) properties except default properties

How can I get the properties of the Javascript Global Object (window object), in addition to the default properties, so that I would know for a particular application which variables became (allowed the global scope) global variables.

Object.getOwnPropertyNames(window); 

This will give me all the properties of the window object. Therefore, I am interested in filtering these properties and getting only those properties that were not initially in the window object, briefly getting properties other than the default settings.

Well, of course, I can first get the properties of the window object, save it in an array, and then compare and filter with the new (dirty) window object, but I wanted to know that there is some direct API (method) that can give me the properties other than the default settings.

+4
source share

All Articles