这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
安全上下文
此特征只可用于
安全上下文
(HTTPS),在某些或所有
支持浏览器
.
wakeLock
只读特性返回
WakeLock
interface which allows a document to acquire a screen wake lock. While a screen wake lock is active, the user agent will try to prevent the device from dimming the screen, turning it off completely, or showing a screensaver.
const wakeLock = navigator.wakeLock;
| 规范 | 状态 | 注释 |
|---|---|---|
| Screen Wake Lock API | 编者草案 | 初始定义 |
No compatibility data found. Please contribute data for "api.Navigator.wakeLock" (depth: 1) to the MDN 兼容性数据存储库 .
Navigator
activeVRDisplays
appCodeName
appName
appVersion
battery
buildID
clipboard
connection
cookieEnabled
credentials
deviceMemory
doNotTrack
geolocation
keyboard
语言
languages
locks
maxTouchPoints
mediaDevices
mediaSession
onLine
oscpu
permissions
platform
product
productSub
serviceWorker
userAgent
vendor
vendorSub
webdriver
xr