mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
Remove Page.handleDialog method
This is a left-over after refactoring in f62cfc3b
.
References #2.
This commit is contained in:
parent
632b90efae
commit
163e14345d
@ -14,7 +14,6 @@
|
||||
- [page.extraHTTPHeaders()](#pageextrahttpheaders)
|
||||
- [page.setUserAgentOverride(userAgent)](#pagesetuseragentoverrideuseragent)
|
||||
- [page.userAgentOverride()](#pageuseragentoverride)
|
||||
- [page.handleDialog(accept, promptText)](#pagehandledialogaccept-prompttext)
|
||||
- [page.url()](#pageurl)
|
||||
- [page.setContent(html)](#pagesetcontenthtml)
|
||||
- [page.navigate(url)](#pagenavigateurl)
|
||||
@ -107,13 +106,7 @@ Pages could be closed by `page.close()` method.
|
||||
|
||||
- returns: [<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) Returns user agent override, if any.
|
||||
|
||||
#### page.handleDialog(accept, promptText)
|
||||
|
||||
- `accept` [<boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Wether accept or discard the dialog.
|
||||
- `promptText` [<string>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) Optional text to put inside the text prompt.
|
||||
- returns: [<Promise>](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise) Promise which resolves when the dialog is handled.
|
||||
|
||||
#### page.url()
|
||||
#### page.url()
|
||||
|
||||
- returns: [<Promise<string>>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) Promise which resolves with the current page url.
|
||||
|
||||
|
@ -241,15 +241,6 @@ class Page extends EventEmitter {
|
||||
this.emit(Page.Events.Dialog, dialog);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {boolean} accept
|
||||
* @param {string} promptText
|
||||
* @return {!Promise}
|
||||
*/
|
||||
async handleDialog(accept, promptText) {
|
||||
return this._client.send('Page.handleJavaScriptDialog', {accept, promptText});
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {!Promise<string>}
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user