ict.ken.be

Delivering solid user friendly software solutions since the dawn of time.

Developer tools show only custom window properties

Categories: Javascript

You can run this code in your browser console and then add a watch for the windowCustomized variable. It will have only custom added window properties or leaks.

windowCustomized = {};
var iframe = document.createElement('iframe');
iframe.onload = function() {
var standardGlobals = Object.keys(iframe.contentWindow);
for(var b in window) {
const prop = window[b];
if(window.hasOwnProperty(b) && prop && !prop.toString().includes('native code') && !standardGlobals.includes(b)) {
windowCustomized[b] = prop;
}
}
//console.info(windowCustomized)
};
iframe.src = 'about:blank';
document.body.appendChild(iframe);
//inspect(windowCustomized);