Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: link to the new docs from source #5092

Merged
merged 1 commit into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/src/api/class-elementhandle.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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