找出并打印window非原生扩展属性 windowExtendAttr.js
supme
找出并打印window非原生扩展属性 windowExtendAttr.js
window扩展属性,扩展方法,扩展函数,非原生属性,非原生方法,非原生函数
http://owmivsi48.bkt.clouddn.com/windowExtendAttr.js
// windowExtendAttr.js (function() { var iframe = document.createElement("iframe"); document.body.appendChild(iframe); var originWindow = iframe.contentWindow, currentWindow = window; var origin = Object.keys(originWindow), current = Object.keys(currentWindow), extendAttr = {}; current.forEach((key) => { if (originWindow[key] === undefined) { extendAttr[key] = currentWindow[key] }; }) console.log(`origin window:${origin.length},current window:${current.length},extentAttr:${Object.keys(extendAttr).length}`) console.log(`extendAttr:`, extendAttr ); document.body.removeChild(iframe); })();