diff --git a/source b/source index 142c43dfb1f..1da03ad4110 100644 --- a/source +++ b/source @@ -4608,10 +4608,12 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • navigation status complete
  • navigation status url
  • navigation status suggested filename
  • +
  • navigation status downloaded filepath
  • WebDriver BiDi navigation aborted
  • WebDriver BiDi navigation committed
  • WebDriver BiDi navigation failed
  • WebDriver BiDi navigation started
  • +
  • WebDriver BiDi download end
  • WebDriver BiDi download started
  • WebDriver BiDi fragment navigated
  • WebDriver BiDi DOM content loaded
  • @@ -25788,17 +25790,60 @@ document.body.appendChild(wbr);

    To handle as a download a response - response:

    + response with an optional navigable-or-null + navigable (default null) and an optional navigation ID-or-null + navigationId (default null):

    1. Let suggestedFilename be the result of getting the suggested filename for response.

    2. Provide the user with a way to save response for later use. If the user agent - needs a filename, it should use suggestedFilename. Report any problems downloading the - file to the user.

    3. + needs a filename, it should use suggestedFilename.

      -
    4. Return suggestedFilename.

    5. +
    6. If navigable is not null and navigationId is not null, then invoke + WebDriver BiDi download started with navigable and a + new WebDriver BiDi navigation status whose id is navigationId, status is "complete", url is response's URL, and suggestedFilename is + suggestedFilename.

    7. + +
    8. +

      If the file downloading was canceled by user or by the user agent, or if the file downloading + faced any problems, then:

      + +
        +
      1. If navigable is not null and navigationId is not null, then + invoke WebDriver BiDi download end with navigable and a new + WebDriver BiDi navigation status whose id is navigationId, status is "canceled", url is response's URL.

      2. +
      +
    9. + +
    10. +

      When the file downloading successfully completed:

      + +
        +
      1. If navigable is not null and navigationId is not null, then + invoke WebDriver BiDi download end with navigable and a new + WebDriver BiDi navigation status whose id is navigationId, status is "complete", downloadedFilepath is an absolute path + of the downloaded file if available, otherwise null, url is response's URL.

      2. +
      +

    To get the suggested filename for a uaAllowsDownloading are true, then:

      -
    1. Let suggestedFilename be the result of handling as a download navigationParams's response.

    2. - -
    3. Invoke WebDriver BiDi download started with navigable and a - new WebDriver BiDi navigation status whose id is navigationId, status is "complete", url is navigationParams's response's URL, and suggestedFilename is - suggestedFilename.

    4. +
    5. Handle as a download + navigationParams's response + with navigable and navigationId.