From 163e14345d3b66124c205fa98631fecfde13842b Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Fri, 16 Jun 2017 11:23:58 -0700 Subject: [PATCH] Remove Page.handleDialog method This is a left-over after refactoring in f62cfc3b. References #2. --- docs/api.md | 9 +-------- lib/Page.js | 9 --------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/docs/api.md b/docs/api.md index 403956bc..6888f220 100644 --- a/docs/api.md +++ b/docs/api.md @@ -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. diff --git a/lib/Page.js b/lib/Page.js index a73b6dd0..328bc023 100644 --- a/lib/Page.js +++ b/lib/Page.js @@ -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} */