zoukankan      html  css  js  c++  java
  • xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

    window.navigator All In One

    "use strict";
    
    /**
     *
     * @author xgqfrms
     * @license MIT
     * @copyright xgqfrms
     * @created 2020-11-11
     * @modified
     *
     * @description
     * @difficulty Easy Medium Hard
     * @complexity O(n)
     * @augments
     * @example
     * @link
     * @solutions
     *
     * @best_solutions
     *
     */
    
    const log = console.log;
    
    if(window.navigator) {
      log(`window.navigator =`, navigator)
    }
    
    for(const item in navigator) {
      // log(`navigator.${item} =`, item);
      // log(`navigator.${item} =`, item, typeof item);
      log(`navigator.${item} =`, item, navigator[item]);
    }
    
    // navigator.vendorSub = vendorSub
    // navigator.productSub = productSub
    // navigator.vendor = vendor
    // navigator.maxTouchPoints = maxTouchPoints
    // navigator.userActivation = userActivation
    // navigator.doNotTrack = doNotTrack
    // navigator.geolocation = geolocation
    // navigator.connection = connection
    // navigator.plugins = plugins
    // navigator.mimeTypes = mimeTypes
    // navigator.webkitTemporaryStorage = webkitTemporaryStorage
    // navigator.webkitPersistentStorage = webkitPersistentStorage
    // navigator.hardwareConcurrency = hardwareConcurrency
    // navigator.cookieEnabled = cookieEnabled
    // navigator.appCodeName = appCodeName
    // navigator.appName = appName
    // navigator.appVersion = appVersion
    // navigator.platform = platform
    // navigator.product = product
    // navigator.userAgent = userAgent
    // navigator.language = language
    // navigator.languages = languages
    // navigator.onLine = onLine
    // navigator.getBattery = getBattery
    // navigator.getGamepads = getGamepads
    // navigator.javaEnabled = javaEnabled
    // navigator.sendBeacon = sendBeacon
    // navigator.vibrate = vibrate
    // navigator.scheduling = scheduling
    // navigator.xr = xr
    // navigator.mediaCapabilities = mediaCapabilities
    // navigator.permissions = permissions
    // navigator.locks = locks
    // navigator.wakeLock = wakeLock
    // navigator.usb = usb
    // navigator.mediaSession = mediaSession
    // navigator.clipboard = clipboard
    // navigator.credentials = credentials
    // navigator.keyboard = keyboard
    // navigator.mediaDevices = mediaDevices
    // navigator.storage = storage
    // navigator.serviceWorker = serviceWorker
    // navigator.deviceMemory = deviceMemory
    // navigator.presentation = presentation
    // navigator.bluetooth = bluetooth
    // navigator.registerProtocolHandler = registerProtocolHandler
    // navigator.unregisterProtocolHandler = unregisterProtocolHandler
    // navigator.getInstalledRelatedApps = getInstalledRelatedApps
    // navigator.clearAppBadge = clearAppBadge
    // navigator.setAppBadge = setAppBadge
    // navigator.getUserMedia = getUserMedia
    // navigator.requestMIDIAccess = requestMIDIAccess
    // navigator.requestMediaKeySystemAccess = requestMediaKeySystemAccess
    // navigator.webkitGetUserMedia = webkitGetUserMedia
    
    
    

    导航器界面表示用户代理的状态和身份。它允许脚本查询并注册自己以进行一些活动。

    https://developer.mozilla.org/en-US/docs/Web/API/Navigator

    多点触控检测

    navigator.maxTouchPoints

    const log = console.log;
    
    const touchPoints = navigator.maxTouchPoints;
    
    if (touchPoints > 1) {
      log(`✅ your browser supports multi-touch`)
    } else {
     log(`❌  your  browser not supports multi-touch`)
    }
    
    

    https://www.w3.org/TR/pointerevents2/#extensions-to-the-navigator-interface

    https://developer.mozilla.org/en-US/docs/Web/API/Navigator/maxTouchPoints

    refs

    UA

    https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent

    
    
    


    ©xgqfrms 2012-2020

    www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


  • 相关阅读:
    利用Spring MVC 上传图片文件
    HdU 4046 Panda 段树
    unity3D的FingerGestures小工具
    深入了解java同步、锁紧机构
    _00021 尼娜抹微笑伊拉克_谁的的最离奇的异常第二阶段 Jedis pool.returnResource(jedis)
    【从翻译mos文章】正在实施的获取job的 session id
    找呀志_通过开源框架引AsyncHttpClient上传文件
    [LeetCode]Count and Say
    使用Intent启动组件
    cpe移植framework后,。解决问题的现有数据库
  • 原文地址:https://www.cnblogs.com/xgqfrms/p/13966715.html
Copyright © 2011-2022 走看看