Created
August 13, 2021 16:03
-
-
Save 166MMX/3cdebc80ebeac9635bd24a4b50b468b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
const b = new Set(['previousElementSibling','offsetParent','parentNode','parentElement','nextElementSibling','nextSibling','previousSibling','documentElement','body','ownerDocument','firstElement', | |
'head','images','scripts','links','forms','scrollingElement','children','firstElementChild','lastElementChild','activeElement','ownerNode','childNodes','styleSheets','lastChild' | |
]); | |
const v = new Set(); | |
const a = function (s, n) { | |
if (v.has(s)) { | |
return; | |
} | |
v.add(s); | |
for (const i of Object.getOwnPropertyNames(s)) { | |
try { | |
const e = Object.getOwnPropertyDescriptor(s,i).value; | |
if (typeof e === 'function' && e.name === 'nrWrapper') { | |
console.log('nrWrapper %s.%s', n, i); | |
} | |
if((typeof e === 'object' ||typeof e === 'function') && !b.has(i)) { | |
a(e,`${n}.${i}`) | |
a(e.prototype,`${n}.${i}`) | |
a(e.constructor,`${n}.${i}`) | |
} | |
} catch (e) { | |
} | |
} | |
}; | |
a(window, 'window') | |
}()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment