Skip to content

Implement document load cancellation #19309

Closed

Description

@jdm

This has two parts to it:

  • make pressing escape in the default embedding cancel the ongoing load of the foreground, top-most document
  • cause all ongoing subresource loads for the document to be cancelled when the document is cancelled

The easiest way to tie the loads together might be to move the cancellation sender into the LoadType enum.

Blocked on #19274.

Activity

  1. added
    A-content/dom
    on Nov 21, 2017
  2. gterzian commented on Jun 28, 2018

    @gterzian
    Member

    If no one is doing this, I would be interested...

  3. gterzian commented on Jun 29, 2018

    @gterzian
    Member

    I propose making this about implementing the following:

    1. https://html.spec.whatwg.org/multipage/window-object.html#dom-window-stop
    2. https://html.spec.whatwg.org/multipage/browsing-the-web.html#abort-a-document

    and also adding a hook at the embedding level via the escape key, to perform a window.stop() on the "foreground, top-most document", or perhaps 'the active tab' is another way to put it.

    By the way, I think such a hook is covered by this part of the spec: "User agents may allow users to explicitly invoke the abort a document algorithm for a Document. If the user does so, then, if that Document is an active document, the user agent should queue a task to fire an event named abort at that Document's Window object before invoking the abort algorithm."

    Currently we don't have the concept of an "foreground, top-most document/active tab", so maybe I'll end implementing it in some simple form as part of this too @paulrouget

  4. paulrouget commented on Jun 29, 2018

    @paulrouget
    Contributor

    Works for me.

  5. gterzian commented on Jun 29, 2018

    @gterzian
    Member

    Also worth noting:

    ""abort" Event Isn't Fired When Aborting Document Load" whatwg/html#3525

    "add test for aborting a document load" web-platform-tests/wpt#9933

    "Add tests for window.stop" web-platform-tests/wpt#11154

  6. gterzian commented on Jul 2, 2018

    @gterzian
    Member

    Also worth noting:
    When to "fail the connection" of an EventSource? whatwg/html#3789

  7. added 11 commits that reference this issue on Jul 22, 2018
    fa6711c
    267c721
    f6ac7d0
    6fac7a3
    17edfbd
    0c09ac2
    50c2234
    a8c8ade
    94120c2
    e543cba
    076198f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/dom

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions