Skip to content

Commit

Permalink
docs: link to the new docs from source (#5092)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman committed Jan 21, 2021
1 parent c757ba7 commit 8f06761
Show file tree
Hide file tree
Showing 8 changed files with 803 additions and 891 deletions.
8 changes: 4 additions & 4 deletions docs/src/api/class-elementhandle.md
Expand Up @@ -62,7 +62,7 @@ ElementHandle instances can be used as an argument in [`method: Page.$eval`] and
- returns: <[null]|[ElementHandle]>

The method finds an element matching the specified selector in the `ElementHandle`'s subtree. See
[Working with selectors](./selectors.md#working-with-selectors) for more details. If no elements match the selector,
[Working with selectors](./selectors.md) for more details. If no elements match the selector,
returns `null`.

### param: ElementHandle.$.selector = %%-query-selector-%%
Expand All @@ -73,7 +73,7 @@ returns `null`.
- returns: <[Array]<[ElementHandle]>>

The method finds all elements matching the specified selector in the `ElementHandle`s subtree. See
[Working with selectors](./selectors.md#working-with-selectors) for more details. If no elements match the selector,
[Working with selectors](./selectors.md) for more details. If no elements match the selector,
returns empty array.

### param: ElementHandle.$$.selector = %%-query-selector-%%
Expand All @@ -86,7 +86,7 @@ returns empty array.
Returns the return value of [`param: pageFunction`]

The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a first
argument to [`param: pageFunction`]. See [Working with selectors](./selectors.md#working-with-selectors) for more
argument to [`param: pageFunction`]. See [Working with selectors](./selectors.md) for more
details. If no elements match the selector, the method throws an error.

If [`param: pageFunction`] returns a [Promise], then `frame.$eval` would wait for the promise to resolve and return its
Expand Down Expand Up @@ -134,7 +134,7 @@ Returns the return value of [`param: pageFunction`]

The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array of
matched elements as a first argument to [`param: pageFunction`]. See
[Working with selectors](./selectors.md#working-with-selectors) for more details.
[Working with selectors](./selectors.md) for more details.

If [`param: pageFunction`] returns a [Promise], then `frame.$$eval` would wait for the promise to resolve and return its
value.
Expand Down
24 changes: 12 additions & 12 deletions docs/src/api/class-frame.md
Expand Up @@ -82,7 +82,7 @@ with sync_playwright() as playwright:
Returns the ElementHandle pointing to the frame element.

The method finds an element matching the specified selector within the frame. See
[Working with selectors](./selectors.md#working-with-selectors) for more details. If no elements match the selector,
[Working with selectors](./selectors.md) for more details. If no elements match the selector,
returns `null`.

### param: Frame.$.selector = %%-query-selector-%%
Expand All @@ -95,7 +95,7 @@ returns `null`.
Returns the ElementHandles pointing to the frame elements.

The method finds all elements matching the specified selector within the frame. See
[Working with selectors](./selectors.md#working-with-selectors) for more details. If no elements match the selector,
[Working with selectors](./selectors.md) for more details. If no elements match the selector,
returns empty array.

### param: Frame.$$.selector = %%-query-selector-%%
Expand All @@ -108,7 +108,7 @@ returns empty array.
Returns the return value of [`param: pageFunction`]

The method finds an element matching the specified selector within the frame and passes it as a first argument to
[`param: pageFunction`]. See [Working with selectors](./selectors.md#working-with-selectors) for more details. If no
[`param: pageFunction`]. See [Working with selectors](./selectors.md) for more details. If no
elements match the selector, the method throws an error.

If [`param: pageFunction`] returns a [Promise], then `frame.$eval` would wait for the promise to resolve and return its
Expand Down Expand Up @@ -155,7 +155,7 @@ Optional argument to pass to [`param: pageFunction`]
Returns the return value of [`param: pageFunction`]

The method finds all elements matching the specified selector within the frame and passes an array of matched elements
as a first argument to [`param: pageFunction`]. See [Working with selectors](./selectors.md#working-with-selectors) for
as a first argument to [`param: pageFunction`]. See [Working with selectors](./selectors.md) for
more details.

If [`param: pageFunction`] returns a [Promise], then `frame.$$eval` would wait for the promise to resolve and return its
Expand Down Expand Up @@ -416,9 +416,9 @@ Returns the return value of [`param: pageFunction`]
If the function passed to the [`method: Frame.evaluate`] returns a [Promise], then [`method: Frame.evaluate`] would wait for the promise to
resolve and return its value.

If the function passed to the [`method: Frame.evaluate`] returns a non-[Serializable] value, then[ method: `Frame.evaluate`] returns
`undefined`. DevTools Protocol also supports transferring some additional values that are not serializable by `JSON`:
`-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals.
If the function passed to the [`method: Frame.evaluate`] returns a non-[Serializable] value, then
[`method: Frame.evaluate`] returns `undefined`. DevTools Protocol also supports transferring some additional values that
are not serializable by `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals.

```js
const result = await frame.evaluate(([x, y]) => {
Expand Down Expand Up @@ -493,11 +493,11 @@ Optional argument to pass to [`param: pageFunction`]

Returns the return value of [`param: pageFunction`] as in-page object (JSHandle).

The only difference between [`method: Frame.evaluate`] and [`method: Frame.evaluateHandle`] is that[ method: Fframe.evaluateHandle`] returns in-page
object (JSHandle).
The only difference between [`method: Frame.evaluate`] and [`method: Frame.evaluateHandle`] is that
[method: Frame.evaluateHandle`] returns in-page object (JSHandle).

If the function, passed to the [`method: Frame.evaluateHandle`], returns a [Promise], then[ method: Fframe.evaluateHandle`] would wait for
the promise to resolve and return its value.
If the function, passed to the [`method: Frame.evaluateHandle`], returns a [Promise], then
[`method: Frame.evaluateHandle`] would wait for the promise to resolve and return its value.

```js
const aWindowHandle = await frame.evaluateHandle(() => Promise.resolve(window));
Expand Down Expand Up @@ -1024,7 +1024,7 @@ Returns frame's url.

Returns when the [`param: pageFunction`] returns a truthy value, returns that value.

The `waitForFunction` can be used to observe viewport size change:
The [`method: Frame.waitForFunction`] can be used to observe viewport size change:

```js
const { firefox } = require('playwright'); // Or 'chromium' or 'webkit'.
Expand Down
12 changes: 6 additions & 6 deletions docs/src/api/class-page.md
Expand Up @@ -829,12 +829,12 @@ page.evaluate("matchMedia('(prefers-color-scheme: no-preference)').matches")

Returns the value of the [`param: pageFunction`] invocation.

If the function passed to the [`method: Page.evaluate`] returns a [Promise], then [`method: Page.evaluate`] would wait for the promise to
resolve and return its value.
If the function passed to the [`method: Page.evaluate`] returns a [Promise], then [`method: Page.evaluate`] would wait
for the promise to resolve and return its value.

If the function passed to the [`method: Page.evaluate`] returns a non-[Serializable] value, then[ method: `Page.evaluate`] resolves to
`undefined`. DevTools Protocol also supports transferring some additional values that are not serializable by `JSON`:
`-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals.
If the function passed to the [`method: Page.evaluate`] returns a non-[Serializable] value, then
[`method: Page.evaluate`] resolves to `undefined`. DevTools Protocol also supports transferring some additional values
that are not serializable by `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals.

Passing argument to [`param: pageFunction`]:

Expand Down Expand Up @@ -2206,7 +2206,7 @@ Either a predicate that receives an event or an options object. Optional.

Returns when the [`param: pageFunction`] returns a truthy value. It resolves to a JSHandle of the truthy value.

The `waitForFunction` can be used to observe viewport size change:
The [`method: Page.waitForFunction`] can be used to observe viewport size change:

```js
const { webkit } = require('playwright'); // Or 'chromium' or 'firefox'.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/api/class-playwright.md
Expand Up @@ -157,7 +157,7 @@ This object can be used to launch or connect to Firefox, returning instances of
- type: <[Selectors]>

Selectors can be used to install custom selector engines. See
[Working with selectors](./selectors.md#working-with-selectors) for more information.
[Working with selectors](./selectors.md) for more information.

## property: Playwright.webkit
- type: <[BrowserType]>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/api/class-selectors.md
@@ -1,7 +1,7 @@
# class: Selectors

Selectors can be used to install custom selector engines. See
[Working with selectors](./selectors.md#working-with-selectors) for more information.
[Working with selectors](./selectors.md) for more information.

## async method: Selectors.register

Expand Down
4 changes: 2 additions & 2 deletions docs/src/api/params.md
Expand Up @@ -45,7 +45,7 @@ Whether to bypass the [actionability](./actionability.md) checks. Defaults to `f
- `selector` <[string]>

A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See
[working with selectors](./selectors.md#working-with-selectors) for more details.
[working with selectors](./selectors.md) for more details.

## input-position
- `position` <[Object]>
Expand Down Expand Up @@ -85,7 +85,7 @@ defaults to 1. See [UIEvent.detail].
## query-selector
- `selector` <[string]>

A selector to query for. See [working with selectors](./selectors.md#working-with-selectors) for more details.
A selector to query for. See [working with selectors](./selectors.md) for more details.

## wait-for-selector-state
- `state` <"attached"|"detached"|"visible"|"hidden">
Expand Down

0 comments on commit 8f06761

Please sign in to comment.