files/en-us/web/api/idledeadline/index.md
{{APIRef("Background Tasks")}}
The IdleDeadline interface is used as the data type of the input parameter to idle callbacks established by calling {{domxref("Window.requestIdleCallback()")}}. It offers a method, {{domxref("IdleDeadline.timeRemaining", "timeRemaining()")}}, which lets you determine how much longer the user agent estimates it will remain idle and a property, {{domxref("IdleDeadline.didTimeout", "didTimeout")}}, which lets you determine if your callback is executing because its timeout duration expired.
To learn more about how request callbacks work, see Collaborative Scheduling of Background Tasks.
true if the callback is being executed because the timeout specified when the idle callback was installed has expired.See our complete example in the article Cooperative Scheduling of Background Tasks API.
{{Specifications}}
{{Compat}}