From 994f6a8e002035ee78c5c8cdab0f595b885e4837 Mon Sep 17 00:00:00 2001 From: Ross McIlroy Date: Thu, 27 Jul 2017 11:43:23 +0100 Subject: [PATCH] Address comments --- index.html | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/index.html b/index.html index 4874e0d..2cc2c37 100644 --- a/index.html +++ b/index.html @@ -328,9 +328,9 @@

`Window` interface extensions

  • An idle callback identifier, which is a number which MUST initially be zero.
  • -

    Each IdleDeadline has an [internal slot] which holds a +

    Each IdleDeadline has an associated time which holds a [DOMHighResTimeStamp] representing the absolute time in milliseconds of the - deadline. This slot MUST be populated when the IdleDeadline is + deadline. This MUST be populated when the IdleDeadline is created.

    The `requestIdleCallback` method

    @@ -411,16 +411,15 @@

    The `cancelIdleCallback` method

    The `timeRemaining` method

    When the `timeRemaining()` method is invoked on an IdleDeadline object it MUST return the duration, as a [DOMHighResTimeStamp], between - the current time and the [internal slot] on IdleDeadline which - stores it's absolute deadline. - The value SHOULD be accurate to 5 microseconds - see "Privacy and + the current time and the time associated with the IdleDeadline + object. The value SHOULD be accurate to 5 microseconds - see "Privacy and Security" section of [[!HR-TIME]]. This value is calculated by performing the following steps:

    1. Let now be a [DOMHighResTimeStamp] representing - the current time in milliseconds.
    2. -
    3. Let deadline be the value of the IdleDeadline - object's [internal slot] which holds the absolute deadline.
    4. + [current high resolution time] in milliseconds. +
    5. Let deadline be the time associated with the + IdleDeadline object.
    6. Let timeRemaining be deadline - now.
    7. If timeRemaining is negative, set it to 0.
    8. @@ -525,9 +524,9 @@

      Invoke idle callbacks algorithm

    9. If document's `Window` object's list of runnable idle callbacks is now empty, remove document from docs.
    10. -
    11. Let deadlineArg be a new IdleDeadline. Store - deadline in an [internal slot] on deadlineArg - as it's absolute deadline and set the `didTimeout` attribute to +
    12. Let deadlineArg be a new IdleDeadline. + Set the time associated with deadlineArg to + deadline and set the `didTimeout` attribute to `false`.
    13. Call callback with deadlineArg as its argument. If an uncaught runtime script error occurs, then [report @@ -558,10 +557,9 @@

      Invoke idle callback timeout algorithm

      idle request callbacks and the list of runnable idle callbacks.
    14. Let now be the current time.
    15. -
    16. Let deadlineArg be a new IdleDeadline. Store - now in an [internal slot] on deadlineArg - as it's absolute deadline and set the `didTimeout` attribute to - `true`.
    17. +
    18. Let deadlineArg be a new IdleDeadline. + Set the time associated with deadlineArg to + now and set the `didTimeout` attribute to `true`.
    19. Call callback with deadlineArg as its argument. If an uncaught runtime script error occurs, then [report the error].
    20. @@ -589,8 +587,8 @@

      Acknowledgments

      The editors would like to thank the following people for contributing to this specification: Sami Kyostila, Alex Clarke, Boris Zbarsky, Marcos Caceres, Jonas Sicking, Robert O'Callahan, David Baron, Todd Reifsteck, - Tobin Titus, Elliott Sprehn, Tetsuharu OHZEKI, Lon Ingram, Domenic Denicola - and Philippe Le Hegaret.

      + Tobin Titus, Elliott Sprehn, Tetsuharu OHZEKI, Lon Ingram, Domenic Denicola, + Philippe Le Hegaret and Anne van Kesteren .

    @@ -604,9 +602,9 @@

    Acknowledgments

    [task source]: http://www.w3.org/TR/2011/WD-html5-20110525/webappapis.html#task-source [event loop]: http://www.w3.org/TR/html5/webappapis.html#event-loop [DOMHighResTimestamp]: http://www.w3.org/TR/hr-time-2/#dom-domhighrestimestamp +[current high resolution time] https://w3c.github.io/hr-time/#dfn-current-high-resolution-time [pv-hidden]: http://www.w3.org/TR/page-visibility/#dom-document-hidden [fully active]: http://www.w3.org/TR/html5/browsers.html#fully-active [list of active timers]: http://www.w3.org/TR/html5/webappapis.html#list-of-active-timers [requestAnimationFrame]: http://www.w3.org/TR/animation-timing/#dom-windowanimationtiming-requestanimationframe [report the error]: http://www.w3.org/TR/html5/webappapis.html#report-the-error -[internal slot]: https://tc39.github.io/ecma262/#sec-object-internal-methods-and-internal-slots