mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 05:37:20 +03:00
docs(download): improve documentation (#6486)
This commit is contained in:
parent
d08c50d277
commit
33823a9143
@ -2,8 +2,8 @@
|
||||
|
||||
[Download] objects are dispatched by page via the [`event: Page.download`] event.
|
||||
|
||||
All the downloaded files belonging to the browser context are deleted when the browser context is closed. All downloaded
|
||||
files are deleted when the browser closes.
|
||||
If `downloadsPath` isn't specified, all the downloaded files belonging to the browser context are deleted when the
|
||||
browser context is closed. And all downloaded files are deleted when the browser closes.
|
||||
|
||||
Download event is emitted once the download starts. Download path becomes available once download completes:
|
||||
|
||||
@ -77,13 +77,13 @@ wait for the download to finish if necessary. The method throws when connected r
|
||||
|
||||
## async method: Download.saveAs
|
||||
|
||||
Saves the download to a user-specified path. It is safe to call this method while the download
|
||||
is still in progress.
|
||||
Copy the download to a user-specified path. It is safe to call this method while the download
|
||||
is still in progress. Will wait for the download to finish if necessary.
|
||||
|
||||
### param: Download.saveAs.path
|
||||
- `path` <[path]>
|
||||
|
||||
Path where the download should be saved.
|
||||
Path where the download should be copied.
|
||||
|
||||
## method: Download.suggestedFilename
|
||||
- returns: <[string]>
|
||||
|
9
types/types.d.ts
vendored
9
types/types.d.ts
vendored
@ -9264,8 +9264,8 @@ export interface Dialog {
|
||||
* [Download] objects are dispatched by page via the
|
||||
* [page.on('download')](https://playwright.dev/docs/api/class-page#pageondownload) event.
|
||||
*
|
||||
* All the downloaded files belonging to the browser context are deleted when the browser context is closed. All downloaded
|
||||
* files are deleted when the browser closes.
|
||||
* If `downloadsPath` isn't specified, all the downloaded files belonging to the browser context are deleted when the
|
||||
* browser context is closed. And all downloaded files are deleted when the browser closes.
|
||||
*
|
||||
* Download event is emitted once the download starts. Download path becomes available once download completes:
|
||||
*
|
||||
@ -9305,8 +9305,9 @@ export interface Download {
|
||||
path(): Promise<null|string>;
|
||||
|
||||
/**
|
||||
* Saves the download to a user-specified path. It is safe to call this method while the download is still in progress.
|
||||
* @param path Path where the download should be saved.
|
||||
* Copy the download to a user-specified path. It is safe to call this method while the download is still in progress. Will
|
||||
* wait for the download to finish if necessary.
|
||||
* @param path Path where the download should be copied.
|
||||
*/
|
||||
saveAs(path: string): Promise<void>;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user