010.环境整合

根据那些大的对象,我们已经可以搭建出一个大体的环境了,还有一些常见并且重要的对象或者方法和属性都会补充齐全

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 : '',
    //    实例方法
};

// 日常常见的属性如:窗口大小 user-agent ...(可写死)



// 日常常见的变化属性如 : href cookie...



// 增加地方检测的插件如 :Canvas WebRTC AudioContext WebGL()



// 增加新的对象



// 增加新的 HTML DOM API



// 要执行的js代码


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值