Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

이 글은 편집 검토가 필요합니다. 도울을 줄 수 있는 방법을 살펴보세요.

이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 함께 해서 번역을 마치도록 도와 주세요!

Non-standard
This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.

This Navigator.requestWakeLock() method of the Wake Lock API is used to request a MozWakeLock on any resource of the device. This means that you can prevent that resource from becoming unavailable as long as your app holds a lock for that resource. For example, a voice recording app can obtain a lock to keep the screen on during recording so that it can give prover visual feedback to the user that recording is progressing.

Note: When the window that requested one or more wake locks is closed or destroyed, any wake locks it acquired are implicitly released; no manual release is necessary.

Syntax

lock = window.navigator.requestWakeLock(resourceName);

Parameters

resourceName
A string representing the name of the resource to lock. Gaia uses four basic resources names: screen, cpuwifi, and gps, but any certified application can expose new resources.

Return value

Returns a MozWakeLock object you can use to keep track of or release the lock..

Specification

W3C tracks Wake Lock: Use cases and is working on the specification of the Wake Lock API.

See also

문서 태그 및 공헌자

 이 페이지의 공헌자: leolux, yachiehwu, teoli, Dietrich, arasbm, kscarfone, Sheppy, Jeremie, markg
 최종 변경: leolux,