根据那些大的对象,我们已经可以搭建出一个大体的环境了,还有一些常见并且重要的对象或者方法和属性都会补充齐全
window = {
closed : '',
console : '',
customElements : '',
devicePixelRatio : '',
frameElement : '',
frames : '',
innerHeight : '',
innerWidth : '',
length : '',
localStorage : '',
locationbar : '',
menubar : '',
name : '',
opener : '',
outerHeight : '',
outerWidth : '',
pageXOffset : '',
pageYOffset : '',
parent : '',
personalbar : '',
scheduler : '',
screenLeft : '',
screenTop : '',
screenX : '',
screenY : '',
scrollbars : '',
scrollX : '',
scrollY : '',
self : '',
sessionStorage : '',
speechSynthesis : '',
toolbar : '',
top : '',
visualViewport : '',
window : '',
alert:function () {},
blur:function () {},
cancelAnimationFrame:function () {},
cancelIdleCallback:function () {},
clearImmediate:function () {},
close:function () {},
confirm:function () {},
convertPointFromNodeToPage:function () {},
dump:function () {},
find:function () {},
focus:function () {},
getComputedStyle:function () {},
getDefaultComputedStyle:function () {},
getSelection:function () {},
matchMedia:function () {},
moveBy:function () {},
moveTo:function () {},
open:function () {},
postMessage:function () {},
print:function () {},
prompt:function () {},
queryLocalFonts:function () {},
requestAnimationFrame:function () {},
requestIdleCallback:function () {},
resizeBy:function () {},
resizeTo:function () {},
scroll:function () {},
scrollBy:function () {},
scrollByLines:function () {},
scrollByPages:function () {},
scrollTo:function () {},
setImmediate:function () {},
showDirectoryPicker:function () {},
showOpenFilePicker:function () {},
showSaveFilePicker:function () {},
sizeToContent:function () {},
stop:function () {},
updateCommands:function () {},
toString: function () {
return "[object Window]"
},
};
window.document = document = {
activeElement : '',
adoptedStyleSheets : '',
body : '',
characterSet : '',
childElementCount : '',
children : '',
compatMode : '',
contentType : '',
cookie : '',
currentScript : '',
defaultView : '',
designMode : '',
dir : '',
doctype : '',
documentElement : '',
documentURI : '',
embeds : '',
featurePolicy : '',
firstElementChild : '',
fonts : '',
forms : '',
fragmentDirective : '',
fullscreenElement : '',
fullscreenEnabled : '',
head : '',
hidden : '',
images : '',
implementation : '',
lastElementChild : '',
lastModified : '',
links : '',
location : '',
pictureInPictureElement : '',
pictureInPictureEnabled : '',
plugins : '',
pointerLockElement : '',
readyState : '',
referrer : '',
scripts : '',
scrollingElement : '',
styleSheets : '',
timeline : '',
title : '',
URL : '',
visibilityState : '',
adoptNode:function () {},
append:function () {},
caretPositionFromPoint:function () {},
caretRangeFromPoint:function () {},
close:function () {},
createAttribute:function () {},
createAttributeNS:function () {},
createCDATASection:function () {},
createComment:function () {},
createDocumentFragment:function () {},
createElement:function () {},
createElementNS:function () {},
createEvent:function () {},
createExpression:function () {},
createNodeIterator:function () {},
createNSResolver:function () {},
createProcessingInstruction:function () {},
createRange:function () {},
createTextNode:function () {},
createTreeWalker:function () {},
elementFromPoint:function () {},
elementsFromPoint:function () {},
evaluate:function () {},
exitFullscreen:function () {},
exitPictureInPicture:function () {},
exitPointerLock:function () {},
getAnimations:function () {},
getElementById:function () {},
getElementsByClassName:function () {},
getElementsByName:function () {},
getElementsByTagName:function () {},
getElementsByTagNameNS:function () {},
getSelection:function () {},
hasFocus:function () {},
hasStorageAccess:function () {},
importNode:function () {},
mozSetImageElement:function () {},
open:function () {},
prepend:function () {},
querySelector:function () {},
querySelectorAll:function () {},
releaseCapture:function () {},
replaceChildren:function () {},
requestStorageAccess:function () {},
startViewTransition:function () {},
write:function () {},
writeln:function () {},
};
window.history = history = {
length : '',
scrollRestoration : '',
state : '',
back:function () {},
forward:function () {},
go:function () {},
pushState:function () {},
replaceState:function () {},
};
window.location = location = {
ancestorOrigins : '',
hash : '',
host : '',
hostname : '',
href : '',
origin : '',
pathname : '',
port : '',
protocol : '',
search : '',
assign:function () {},
reload:function () {},
replace:function () {},
toString:function () {},
};
window.navigator = navigator = {
buildID : '',
clipboard : '',
connection : '',
contacts : '',
cookieEnabled : '',
credentials : '',
deviceMemory : '',
geolocation : '',
globalPrivacyControl : '',
gpu : '',
hardwareConcurrency : '',
hid : '',
ink : '',
keyboard : '',
language : '',
languages : '',
locks : '',
maxTouchPoints : '',
mediaCapabilities : '',
mediaDevices : '',
mediaSession : '',
mimeTypes : '',
onLine : '',
pdfViewerEnabled : '',
permissions : '',
presentation : '',
serial : '',
serviceWorker : '',
storage : '',
userActivation : '',
userAgent : '',
userAgentData : '',
virtualKeyboard : '',
wakeLock : '',
webdriver : '',
windowControlsOverlay : '',
xr : '',
canShare:function () {},
clearAppBadge:function () {},
getAutoplayPolicy:function () {},
getBattery:function () {},
getGamepads:function () {},
registerProtocolHandler:function () {},
requestMediaKeySystemAccess:function () {},
requestMIDIAccess:function () {},
sendBeacon:function () {},
setAppBadge:function () {},
share:function () {},
unregisterProtocolHandler:function () {},
vibrate:function () {},
};
window.screen = screen = {
availHeight : '',
availLeft : '',
availTop : '',
availWidth : '',
colorDepth : '',
height : '',
left : '',
orientation : '',
pixelDepth : '',
width : '',
};