window.navigator All In One
window.navigator All In One
navigator
"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 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/13966715.html
未经授权禁止转载,违者必究!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· C#/.NET/.NET Core技术前沿周刊 | 第 29 期(2025年3.1-3.9)
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
2019-11-12 ESLint & .eslintignore All In One
2019-11-12 生活常识 & 电热水壶 & 开壶 All In One
2018-11-12 role management
2018-11-12 nodejs & docker
2018-11-12 free online markdown editor
2018-11-12 shit vue-cli & path bug & baseUrl bug