I am experiencing a javascript bug in internet explorer and I suspect its due to a name of a div matching with a global object.
My application loads many javascript libraries.
I want to find what global objects are loaded at runtime
Since all user JS defined global objects/vars are properties of the window object, you can list all the enumerable ones with this:
for (var item in window) {
    console.log(item);
}
This will get you a list of a lot of things including all global functions. If you want to filter out global functions, you can use this:
for (var item in window) {
    var type = typeof window[item];
    if (type != "function") {
        console.log(item + " (" + type + ")");
    }
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With