From 82bb92f103ee02b0036c31b74205519f5f267c1f Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Sat, 30 Jan 2021 22:15:56 -0800 Subject: [PATCH] Revert "docs: add java traits to some methods (#5222)" Breaks playwright.dev --- docs/src/api/class-browsercontext.md | 2 +- docs/src/api/class-browsertype.md | 4 ++-- docs/src/api/class-cdpsession.md | 2 +- docs/src/api/class-download.md | 2 +- docs/src/api/class-frame.md | 2 -- docs/src/api/class-page.md | 6 ++---- docs/src/api/class-route.md | 1 - docs/src/api/class-selectors.md | 2 +- docs/src/api/class-websocket.md | 2 +- docs/src/api/params.md | 8 ++++---- utils/doclint/api_parser.js | 2 +- 11 files changed, 14 insertions(+), 19 deletions(-) diff --git a/docs/src/api/class-browsercontext.md b/docs/src/api/class-browsercontext.md index 08787c7484812..e599498ea0c52 100644 --- a/docs/src/api/class-browsercontext.md +++ b/docs/src/api/class-browsercontext.md @@ -736,7 +736,7 @@ A glob pattern, regex pattern or predicate receiving [URL] used to register a ro Optional handler function used to register a routing with [`method: BrowserContext.route`]. ## async method: BrowserContext.waitForEvent -* langs: csharp, js, python +* langs: - alias-python: expect_event - returns: <[any]> diff --git a/docs/src/api/class-browsertype.md b/docs/src/api/class-browsertype.md index b782aa17db62c..66cfeea97b801 100644 --- a/docs/src/api/class-browsertype.md +++ b/docs/src/api/class-browsertype.md @@ -182,13 +182,13 @@ Maximum time in milliseconds to wait for the browser instance to start. Defaults disable timeout. ### option: BrowserType.launch.env -* langs: csharp, java +* langs: csharp,java - `env` <[Object]<[string], [string]>> Specify environment variables that will be visible to the browser. Defaults to `process.env`. ### option: BrowserType.launch.env -* langs: js, python +* langs: js,python - `env` <[Object]<[string], [string]|[float]|[boolean]>> Specify environment variables that will be visible to the browser. Defaults to `process.env`. diff --git a/docs/src/api/class-cdpsession.md b/docs/src/api/class-cdpsession.md index cb06d2607b889..60e8eba815251 100644 --- a/docs/src/api/class-cdpsession.md +++ b/docs/src/api/class-cdpsession.md @@ -1,5 +1,5 @@ # class: CDPSession -* langs: js, python +* langs: js,python * extends: [EventEmitter] The `CDPSession` instances are used to talk raw Chrome Devtools Protocol: diff --git a/docs/src/api/class-download.md b/docs/src/api/class-download.md index c7e45ac292885..984f769ff36d2 100644 --- a/docs/src/api/class-download.md +++ b/docs/src/api/class-download.md @@ -39,7 +39,7 @@ not performed and user has no access to the downloaded files. ::: ## async method: Download.createReadStream -* langs: java, js +* langs: js - returns: <[null]|[Readable]> Returns readable stream for current download or `null` if download failed. diff --git a/docs/src/api/class-frame.md b/docs/src/api/class-frame.md index a7ea739aec65f..bbcbf24658e90 100644 --- a/docs/src/api/class-frame.md +++ b/docs/src/api/class-frame.md @@ -594,8 +594,6 @@ Attribute name to get the value for. ### option: Frame.getAttribute.timeout = %%-input-timeout-%% ## async method: Frame.goto -* langs: - - alias-java: navigate - returns: <[null]|[Response]> Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.md index 8020d8e06bd1c..26ef9dbe3e1b0 100644 --- a/docs/src/api/class-page.md +++ b/docs/src/api/class-page.md @@ -1261,7 +1261,7 @@ frame = page.frame(url=r".*domain.*") ``` ### param: Page.frame.frameSelector -* langs: java, js +* langs: js - `frameSelector` <[string]|[Object]> - `name` <[string]> Frame name specified in the `iframe`'s `name` attribute. Optional. - `url` <[string]|[RegExp]|[function]\([URL]\):[boolean]> A glob pattern, regex pattern or predicate receiving @@ -1313,8 +1313,6 @@ Navigate to the next page in history. ### option: Page.goForward.waitUntil = %%-navigation-wait-until-%% ## async method: Page.goto -* langs: - - alias-java: navigate - returns: <[null]|[Response]> Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the @@ -2159,7 +2157,7 @@ Video object associated with this page. - `height` <[int]> page height in pixels. ## async method: Page.waitForEvent -* langs: csharp, js, python +* langs: - alias-python: expect_event - returns: <[any]> diff --git a/docs/src/api/class-route.md b/docs/src/api/class-route.md index 38e7787b95e92..a03442af8809b 100644 --- a/docs/src/api/class-route.md +++ b/docs/src/api/class-route.md @@ -30,7 +30,6 @@ Optional error code. Defaults to `failed`, could be one of the following: ## async method: Route.continue * langs: - - alias-java: continue_ - alias-python: continue_ Continues route's request with optional overrides. diff --git a/docs/src/api/class-selectors.md b/docs/src/api/class-selectors.md index 8a95522a9def0..a9f7f1fff2437 100644 --- a/docs/src/api/class-selectors.md +++ b/docs/src/api/class-selectors.md @@ -57,7 +57,7 @@ Name that is used in selectors as a prefix, e.g. `{name: 'foo'}` enables `foo=my contain `[a-zA-Z0-9_]` characters. ### param: Selectors.register.script -* langs: java, js +* langs: js - `script` <[function]|[string]|[Object]> - `path` <[path]> Path to the JavaScript file. If `path` is a relative path, then it is resolved relative to the current working directory. Optional. diff --git a/docs/src/api/class-websocket.md b/docs/src/api/class-websocket.md index f19e7a8224db2..e09a46d9b3378 100644 --- a/docs/src/api/class-websocket.md +++ b/docs/src/api/class-websocket.md @@ -35,7 +35,7 @@ Indicates that the web socket has been closed. Contains the URL of the WebSocket. ## async method: WebSocket.waitForEvent -* langs: csharp, js, python +* langs: - alias-python: expect_event - returns: <[any]> diff --git a/docs/src/api/params.md b/docs/src/api/params.md index c5abedd4193e1..99175c3ef390a 100644 --- a/docs/src/api/params.md +++ b/docs/src/api/params.md @@ -147,7 +147,7 @@ Whether to ignore HTTPS errors during navigation. Defaults to `false`. Toggles bypassing page's Content-Security-Policy. ## context-option-viewport -* langs: java, js +* langs: js - `viewport` <[null]|[Object]> - `width` <[int]> page width in pixels. - `height` <[int]> page height in pixels. @@ -292,7 +292,7 @@ Logger sink for Playwright logging. **DEPRECATED** Use [`option: recordVideo`] instead. ## context-option-recordhar -* langs: java, js +* langs: js - `recordHar` <[Object]> - `omitContent` <[boolean]> Optional setting to control whether to omit request content from the HAR. Defaults to `false`. @@ -315,7 +315,7 @@ Optional setting to control whether to omit request content from the HAR. Defaul Path on the filesystem to write the HAR file to. ## context-option-recordvideo -* langs: java, js +* langs: js - `recordVideo` <[Object]> - `dir` <[path]> Path to the directory to put videos into. - `size` <[Object]> Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport`. @@ -356,7 +356,7 @@ option to work. If all contexts override the proxy, global proxy will be never u `launch({ proxy: { server: 'per-context' } })`. ## select-options-values -* langs: java, js +* langs: js - `values` <[null]|[string]|[ElementHandle]|[Array]<[string]>|[Object]|[Array]<[ElementHandle]>|[Array]<[Object]>> - `value` <[string]> Matches by `option.value`. Optional. - `label` <[string]> Matches by `option.label`. Optional. diff --git a/utils/doclint/api_parser.js b/utils/doclint/api_parser.js index f4521fbc66f53..6effc1664ac67 100644 --- a/utils/doclint/api_parser.js +++ b/utils/doclint/api_parser.js @@ -315,7 +315,7 @@ function extractLangs(spec) { aliases[match[1].trim()] = match[2].trim(); } return { - only: only ? only.split(',').map(l => l.trim()) : undefined, + only: only ? only.split(',') : undefined, aliases, types: {}, overrides: {}