Skip to content

Commits on Nov 30, 2021

  1. Remove a setTimeout()'s entry in the map of active timers after it runs

    It used to be unobservable whether a non-repeating timer that had already run its callback had an entry in the list of active timers or not, and so those entries were never removed from the list. However, calculation of the idle deadline, meaning that if a timer expires and is never cancelled, the deadline will be in the past.
    This change avoids this case by removing non-repeating timers from the map of active timers after their callback runs.
    Closes #7376.
    andreubotella committed Nov 30, 2021
  2. Define behavior of <link rel=preload> in detail

    A document keeps a list of preloaded resources, each with relevant parameters from the request, and the response once available.
    Once a <link rel=preload> element starts fetching a resource, that entry is added, and once the response is fully loaded, the fetch consuming the resource receives the response.
    See whatwg/fetch#590.
    noamr committed Nov 30, 2021
  3. Enforce COOP first when opening a popup from a sandbox

    I.e., the relationship between the browsing contexts is severed first and only then does the popup become a network error.
    Tests: WPT html/cross-origin-opener-policy/coop-sandbox-cuts-opener.https.html.
    Closes #7345.
    hemeryar committed Nov 30, 2021

Commits on Nov 29, 2021

  1. Editorial: Move XHR's definition of "entry list" to HTML

    This change also moves the "create an entry" algorithm to HTML, adding to it the conversion to scalar value strings that previously took place in "append an entry". It also links various previously-unlinked usages of "entry list" and "entry" to these definitions.
    Closes #6701.
    andreubotella committed Nov 29, 2021
  2. Specify "time origin" computation

    The time origin, which is the epoch for all performance timeline APIs, was previously defined in
    This makes its computation explicit, without changing its current definition and behavior. Notably:
    * "time origin becomes an environment settings object algorithm, computed differently for windows vs. worker scopes.
    * The 4 places where this timestamp is set are creation of an about:blank browsing context, the beginning of navigation, the confirmation of an unload prompt, and the creation of a worker.
    * The timestamp is a "shared monotonic clock" value, which is defined in HR-TIME (and internally in ECMAScript).
    As part of this PR, also refactored unload prompts to return a result rather than rely on a somewhat hand-wavy "refused to allow" property.
    See w3c/hr-time#131 and w3c/navigation-timing#166. See also w3c/ServiceWorker#1621.
    noamr committed Nov 29, 2021

Commits on Nov 24, 2021

  1. Remove inert check from dialog focusing steps

    This step was redundant. The focus fixup rule should reset focus to body in the modal case, and no element will be focused in the non-modal case. So the behavior doesn't change, in terms of the focused element.
    nt1m committed Nov 24, 2021
  2. Move away from including IANA templates, part 2

    This concludes moving away from using IANA templates to define HTTP headers. It takes care of Last-Event-ID, Ping-From, Ping-To, Refresh, and X-Frame-Options.
    It also adds an index to ensure these headers are still easy to find.
    And finally it corrects the casing of several index sections.
    This helps with #7274 (kept open to update the IANA registry) and fixes #7355.
    annevk committed Nov 24, 2021
  3. Editorial: expose "run steps after a timeout"

    This factors out a new algorithm which can be used by postTask() ( and AbortSignal.timeout() (whatwg/dom#1032), ensuring that they correctly contribute to idle deadline computation and in general share all the appropriate logic with setTimeout() and setInterval().
    This also exports the "timer task source" term since AbortSignal.abort() will want to use that.
    domenic committed Nov 24, 2021

Commits on Nov 23, 2021

  1. Prevent type: "javascript" import asessions

    This was the original intent of the import assertions integration, but type: "javascript" was unintentionally allowed to work due to a bug involving the spec's internal use of the "javascript" module type for JavaScript module scripts.
    Fixes #7342.
    dandclark committed Nov 23, 2021
  2. Move away from including IANA templates

    This is the first step towards addressing #7274. It takes care of Cross-Origin-Embedder-Policy, Cross-Origin-Embedder-Policy-Report-Only, Cross-Origin-Opener-Policy, Cross-Origin-Opener-Policy-Report-Only, and Origin-Agent-Cluster.
    Closes #7325.
    annevk committed Nov 23, 2021
  3. Editorial: modernize timers spec

    In addition to general updates to use modern terminology and improve precision, this:
    * Moves the Web IDL conversion note and example to after the algorithm.
    * Removes the (exported) "list of active timers" concept since it's not something other specs should be messing with.
    * Renames the return value of setTimeout()/setInterval() and the argument to clearTimeout()/clearInterval() from "handle" to "id", since having both "handle" and "handler" was confusing.
    domenic committed Nov 23, 2021

Commits on Nov 22, 2021

  1. Correct a module map example

    annevk committed Nov 22, 2021

Commits on Nov 18, 2021

  1. Handle shadow DOM and <dialog> focusing

    Closes #2393, by making <dialog> behave the same as delegatesFocus: they both "delegate focus" to either autofocus="" if it's specified on a (non-shadow-including) descendant, or the first focusable element among their shadow-including descendants if not.
    domenic committed Nov 18, 2021
  2. Fix a variable reference in module fetching

    moduleRequest → requested
    annevk committed Nov 18, 2021

Commits on Nov 17, 2021

Commits on Nov 15, 2021

  1. Add an explicit algorithm for idle callback deadline

    The algorithm replaces the algorithm that is currently defined in prose here:
    It works like so:
    * Timers can calculate their estimated next callback timestamps, based on their start time and document-inactive time so far.
    * The deadline for idle tasks for an event loop is the earliest between:
      * The time until the next timer callback in this event loop is estimated to fire.
      * The time until the next render, estimated at 1000 ms / refresh rate after the start of the previous task that had a rendering opportunity, if there are pending animation frame callbacks (or if the user agent believes a render is coming).
      * 50ms
    The deadline computation is passed as a set of algorithm steps to the requestIdleCallback() spec, so that it can always return the up-to-date deadline.
    Helps with w3c/requestidlecallback#71.
    noamr committed Nov 15, 2021

Commits on Nov 9, 2021

Commits on Nov 5, 2021

  1. BroadcastChannel: Ignore msgs from detached iframes/closing workers

    For BroadcastChannel instances associated with detached iframes or closing workers, update the specification to require that calls to postMessage() should be ignored (without throwing an exception).
    Closes #7219. Some potential followup in #7253 for the related bfcache case.
    recvfrom committed Nov 5, 2021
  2. Meta: export image request terms

    See WICG/element-timing#66 for context.
    npm1 committed Nov 5, 2021

Commits on Nov 4, 2021

  1. Editorial: use newer method/getter/setter styles

    For many (but not all) method/getter/setter definitions, update to use:
    * The defined term "this", instead of "this X object" or "this element" or "the X object"
    * The "method steps"/"getter steps"/"setter steps" introductory clauses
    * Separate method steps for overloads, calling into a shared algorithm
    Co-authored-by: Anne van Kesteren <>
    domenic and annevk committed Nov 4, 2021

Commits on Nov 3, 2021

  1. Clarify that form state restoration does not fire events

    (But, it does fire formStateRestoreCallback, since that is explicitly used for synchronizing the custom element's internal state.)
    Closes #6853.
    domenic committed Nov 3, 2021
  2. Move Page Visibility APIs into HTML

    Defines the document.hidden and document.visibilityState APIs in the HTML Standard, while improving their definitions to be more rigorous. This is similar to 3285b98 which did the same for the visibilitychange event.
    Also updates the discussion of "page is in the background" to refer to the new definitions.
    See w3c/page-visibility#74 and w3c/page-visibility#73 for more background.
    noamr authored and domenic committed Nov 3, 2021

Commits on Nov 2, 2021

  1. Also fix delegatesFocus and autofocus=""

    9ba7124 updated delegatesFocus to use the shadow tree, as part of #7207. However we forgot to update the autofocus="" processing in the same way.
    domenic committed Nov 2, 2021
  2. ElementInternals: throw exception in validationMessage getter

    Like other constraint validation attributes or methods of the ElementInternals interface, validationMessage needs to throw a "NotSupportedError" DOMException if the target element is not a form-associated custom element.
    EdgarChen committed Nov 2, 2021
  3. Add credentialless value to COEP

    This defines Cross-Origin-Embedder-Policy: credentialless. The credentialless and require-corp values are similar. One or the other is a requirements for the cross-origin isolated capability. They differ mostly in terms of fetching. require-corp requires a Cross-Origin-Resource-Policy header for cross-origin opaque responses. credentialless doesn't, but omits credentials (cookies, client certificates, etc.) in cross-origin "no-cors" requests.
    See for additional context.
    Fetch PR: whatwg/fetch#1229.
    Tests: WPT html/cross-origin-embedder-policy/credentialless.
    Closes #6637.
    ArthurSonzogni committed Nov 2, 2021

Commits on Nov 1, 2021

  1. Fixes to delegatesFocus

    * Make it use the shadow tree instead of the flat tree. Closes #7207.
    * Make it work with the unfocusing steps symmetrically to the focusing steps. Closes #7070.
    domenic committed Nov 1, 2021
  2. Update the list of activation triggering input events

    * Remove all high-level events that follows a low-level event.
    * Add missing low-level events that are known to be required.
    * Add keyboard events, in a conditional manner.
    Fixes #3849.
    mustaqahmed committed Nov 1, 2021

Commits on Oct 29, 2021

  1. Standardize popup features and BarProp values

    Fixes #5872 by standardizing an internal "is popup" boolean, and how it is impacted by various features. Implementations can use this boolean (in addition to other signals) to determine whether an opened window is a popup or not.
    Fixes #4431 by changing the various BarProp visible properties to only reflect this "is popup" boolean, instead of reflecting the actual state of user interface elements, or the passed-in window features.
    Adds a "popup" feature to provide a simpler method of requesting a popup.
    arai-a committed Oct 29, 2021

Commits on Oct 27, 2021