IdleDeadline 인터페이스는 Window.requestIdleCallback()을 호출하여 설정된 유휴 콜백(idle callback)에 대한 입력 매개변수(parameter)의 데이터 타입으로 사용됩니다. timeRemaining() 메서드를 제공하여 사용자 에이전트가 유휴 상태로있을 것으로 추정하는 시간과 속성(property)인 didTimeout을 결정할 수있게하여, timeout 기간이 만료되어 콜백이 실행 중인지 여부를 결정할 수 있습니다.

request callback이 작동하는 방식에 대해 자세히알아 보려면, Collaborative Scheduling of Background Tasks 문서를 읽어보세요.

Properties

IdleDeadline.didTimeout Read only
유휴 콜백을 구현할 때 지정한 timeout이 만료되었음에도 콜백이 실행중인 경우, 값이 true인 Boolean 입니다.

Methods

IdleDeadline.timeRemaining()
현재 유휴 기간(idle period)에 남아있는 밀리초 수를 예측하는 부동 소수점 값인 DOMHighResTimeStamp를 반환합니다. 유휴 기간이 끝나면 값은 0 입니다. 우리의 콜백은 이것을 반복적으로 호출하여, 반환하기 전에 더 많은 작업을 할 수 있는 충분한 시간이 있는지 확인할 수 있습니다.

Example

Cooperative Scheduling of Background Tasks API의 complete example를 참조하세요.

Specifications

Specification Status Comment
Cooperative Scheduling of Background Tasks Proposed Recommendation  

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support 47Edge No support NoFirefox Full support 55
Full support 55
Full support 53
Disabled
Disabled From version 53: this feature is behind the dom.requestIdleCallback.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera Full support 34Safari No support NoWebView Android Full support 47Chrome Android Full support 47Edge Mobile No support NoFirefox Android Full support 55
Full support 55
Full support 53
Disabled
Disabled From version 53: this feature is behind the dom.requestIdleCallback.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Opera Android Full support 37Safari iOS No support NoSamsung Internet Android ?
didTimeoutChrome Full support 47Edge No support NoFirefox Full support 55
Full support 55
Full support 53
Disabled
Disabled From version 53: this feature is behind the dom.requestIdleCallback.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera Full support 34Safari No support NoWebView Android Full support 47Chrome Android Full support 47Edge Mobile No support NoFirefox Android Full support 55
Full support 55
Full support 53
Disabled
Disabled From version 53: this feature is behind the dom.requestIdleCallback.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Opera Android Full support 37Safari iOS No support NoSamsung Internet Android ?
timeRemainingChrome Full support 47Edge No support NoFirefox Full support 55
Full support 55
Full support 53
Disabled
Disabled From version 53: this feature is behind the dom.requestIdleCallback.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera Full support 34Safari No support NoWebView Android Full support 47Chrome Android Full support 47Edge Mobile No support NoFirefox Android Full support 55
Full support 55
Full support 53
Disabled
Disabled From version 53: this feature is behind the dom.requestIdleCallback.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.
Opera Android Full support 37Safari iOS No support NoSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
User must explicitly enable this feature.
User must explicitly enable this feature.

See also

문서 태그 및 공헌자

이 페이지의 공헌자: DeadIntegral
최종 변경자: DeadIntegral,