diff --git a/source b/source index eebe3e57f49..8b098d8c027 100644 --- a/source +++ b/source @@ -25785,17 +25785,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 finished 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 finished with navigable and a new + WebDriver BiDi navigation status whose id is navigationId, status is "completed", 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.