Created
April 17, 2024 17:41
-
-
Save man3kin3ko/0808c64963fbd19a88ff28e10218a8a5 to your computer and use it in GitHub Desktop.
Find all non-standard global objects
This file contains hidden or 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
let standardWindowProps = [ | |
"Array", "Boolean", "Date", "decodeURI", "decodeURIComponent", "encodeURI", | |
"encodeURIComponent", "Error", "eval", "EvalError", "Float32Array", "Float64Array", | |
"Function", "Infinity", "Int16Array", "Int32Array", "Int8Array", "isFinite", | |
"isNaN", "JSON", "Map", "Math", "NaN", "Number", "Object", "parseFloat", | |
"parseInt", "Promise", "Proxy", "RangeError", "ReferenceError", "Reflect", | |
"RegExp", "Set", "String", "Symbol", "SyntaxError", "TypeError", "Uint16Array", | |
"Uint32Array", "Uint8Array", "Uint8ClampedArray", "undefined", "URIError", | |
"WeakMap", "WeakSet", "Atomics", "SharedArrayBuffer", "BigInt", "BigInt64Array", | |
"BigUint64Array", "globalThis", "console", "window", "document", "navigator", | |
"location", "history", "fetch", "alert", "confirm", "prompt", "setTimeout", | |
"clearTimeout", "setInterval", "clearInterval", "requestAnimationFrame", | |
"cancelAnimationFrame", "onselect", "onstalled", "onsubmit", "onsuspend", "ontimeupdate", | |
"ontoggle", "onvolumechange", "onwaiting", "onwebkitanimationend", "onwebkitanimationiteration", | |
"onwebkitanimationstart", "onwebkittransitionend", "onwheel", "onauxclick", "ongotpointercapture", | |
"onlostpointercapture", "onpointerdown", "onpointermove", "onpointerup", "onpointercancel", "onpointerover", | |
"onpointerout", "onpointerenter", "onpointerleave", "onselectstart", "onselectionchange", "onanimationend", | |
"onanimationiteration", "onanimationstart", "ontransitionrun", "ontransitionstart", "ontransitionend", | |
"ontransitioncancel", "onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onlanguagechange", | |
"onmessage", "onmessageerror", "onoffline", "ononline", "onpagehide", "onpageshow", "onpopstate", | |
"onrejectionhandled", "onstorage", "onunhandledrejection", "onunload", "atob", "blur", "btoa","cancelIdleCallback", | |
"captureEvents", "close", "createImageBitmap", "find", "focus", "getComputedStyle", "getSelection", | |
"matchMedia", "moveBy", "moveTo", "open", "postMessage", "print", "queueMicrotask","releaseEvents", | |
"requestIdleCallback", "resizeBy", "resizeTo", "scroll", "scrollBy", "scrollTo", "stop", "webkitCancelAnimationFrame", | |
"webkitRequestAnimationFrame", "originAgentCluster", "onpointerrawupdate", "trustedTypes", "onorientationchange", | |
"orientation", "crossOriginIsolated", "openDatabase", "applicationCache", "caches", "cookieStore", | |
"ondevicemotion", "ondeviceorientation", "ondeviceorientationabsolute", "ontouchcancel", "ontouchend", | |
"ontouchmove", "ontouchstart", "self","name","customElements","locationbar","menubar","personalbar","scrollbars", | |
"statusbar","toolbar","status","closed","frames","length","top","opener","parent","frameElement", | |
"origin","external","screen","innerWidth","innerHeight","scrollX","pageXOffset","scrollY", | |
"pageYOffset","visualViewport","screenX","screenY","outerWidth","outerHeight","devicePixelRatio", | |
"clientInformation","screenLeft","screenTop","defaultStatus","defaultstatus","styleMedia", | |
"onsearch","isSecureContext","performance","onappinstalled","onbeforeinstallprompt","crypto", | |
"indexedDB","webkitStorageInfo","sessionStorage","localStorage","onbeforexrselect","onabort", | |
"onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu", | |
"oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover", | |
"ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata", | |
"oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata", | |
"onloadedmetadata","onloadstart","onmousedown","onmouseenter","onmouseleave","onmousemove", | |
"onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying", | |
"onprogress","onratechange","onreset","onresize","onscroll","onseeked","onseeking", "" | |
]; | |
(function() { | |
let nonstandardWindowProps = []; | |
for (var prop in window) { | |
if (window.hasOwnProperty(prop) && standardWindowProps.indexOf(prop) === -1) { | |
nonstandardWindowProps.push(prop); | |
} | |
} | |
return nonstandardWindowProps; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment