Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN committed Jun 22, 2020
1 parent 85cca06 commit fe2ac37
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion new-docs/puppeteer.elementhandle.__eval.md
Expand Up @@ -6,7 +6,7 @@

This method runs `document.querySelectorAll` within the element and passes it as the first argument to `pageFunction`<!-- -->. If there's no element matching `selector`<!-- -->, the method throws an error.

If `pageFunction` returns a \[Promise\], then `frame.$$eval` would wait for the promise to resolve and return its value.
If `pageFunction` returns a Promise, then `frame.$$eval` would wait for the promise to resolve and return its value.

<b>Signature:</b>

Expand Down
2 changes: 1 addition & 1 deletion new-docs/puppeteer.elementhandle._eval.md
Expand Up @@ -6,7 +6,7 @@

This method runs `document.querySelector` within the element and passes it as the first argument to `pageFunction`<!-- -->. If there's no element matching `selector`<!-- -->, the method throws an error.

If `pageFunction` returns a \[Promise\], then `frame.$eval` would wait for the promise to resolve and return its value.
If `pageFunction` returns a Promise, then `frame.$eval` would wait for the promise to resolve and return its value.

<b>Signature:</b>

Expand Down
4 changes: 2 additions & 2 deletions new-docs/puppeteer.elementhandle.md
Expand Up @@ -42,8 +42,8 @@ The constructor for this class is marked as internal. Third-party code should no
| --- | --- | --- |
| [$(selector)](./puppeteer.elementhandle._.md) | | The method runs <code>element.querySelector</code> within the page. If no element matches the selector, the return value resolves to <code>null</code>. |
| [$$(selector)](./puppeteer.elementhandle.__.md) | | The method runs <code>element.querySelectorAll</code> within the page. If no elements match the selector, the return value resolves to <code>[]</code>. |
| [$$eval(selector, pageFunction, args)](./puppeteer.elementhandle.__eval.md) | | This method runs <code>document.querySelectorAll</code> within the element and passes it as the first argument to <code>pageFunction</code>. If there's no element matching <code>selector</code>, the method throws an error.<!-- -->If <code>pageFunction</code> returns a \[Promise\], then <code>frame.$$eval</code> would wait for the promise to resolve and return its value. |
| [$eval(selector, pageFunction, args)](./puppeteer.elementhandle._eval.md) | | This method runs <code>document.querySelector</code> within the element and passes it as the first argument to <code>pageFunction</code>. If there's no element matching <code>selector</code>, the method throws an error.<!-- -->If <code>pageFunction</code> returns a \[Promise\], then <code>frame.$eval</code> would wait for the promise to resolve and return its value. |
| [$$eval(selector, pageFunction, args)](./puppeteer.elementhandle.__eval.md) | | This method runs <code>document.querySelectorAll</code> within the element and passes it as the first argument to <code>pageFunction</code>. If there's no element matching <code>selector</code>, the method throws an error.<!-- -->If <code>pageFunction</code> returns a Promise, then <code>frame.$$eval</code> would wait for the promise to resolve and return its value. |
| [$eval(selector, pageFunction, args)](./puppeteer.elementhandle._eval.md) | | This method runs <code>document.querySelector</code> within the element and passes it as the first argument to <code>pageFunction</code>. If there's no element matching <code>selector</code>, the method throws an error.<!-- -->If <code>pageFunction</code> returns a Promise, then <code>frame.$eval</code> would wait for the promise to resolve and return its value. |
| [$x(expression)](./puppeteer.elementhandle._x.md) | | The method evaluates the XPath expression relative to the elementHandle. If there are no such elements, the method will resolve to an empty array. |
| [asElement()](./puppeteer.elementhandle.aselement.md) | | |
| [boundingBox()](./puppeteer.elementhandle.boundingbox.md) | | This method returns the bounding box of the element (relative to the main frame), or <code>null</code> if the element is not visible. |
Expand Down
2 changes: 1 addition & 1 deletion new-docs/puppeteer.jshandle.evaluate.md
Expand Up @@ -4,7 +4,7 @@

## JSHandle.evaluate() method

This method passes this handle as the first argument to `pageFunction`<!-- -->. If `pageFunction` returns a \[Promise\], then `handle.evaluate` would wait for the promise to resolve and return its value.
This method passes this handle as the first argument to `pageFunction`<!-- -->. If `pageFunction` returns a Promise, then `handle.evaluate` would wait for the promise to resolve and return its value.

<b>Signature:</b>

Expand Down
2 changes: 1 addition & 1 deletion new-docs/puppeteer.jshandle.evaluatehandle.md
Expand Up @@ -27,7 +27,7 @@ Promise&lt;[JSHandle](./puppeteer.jshandle.md)<!-- -->&gt;

The only difference between `evaluateHandle.evaluate` and `evaluateHandle.evaluateHandle` is that `executionContext.evaluateHandle` returns in-page object (JSHandle).

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

See [Page.evaluateHandle()](./puppeteer.page.evaluatehandle.md) for more details.

2 changes: 1 addition & 1 deletion new-docs/puppeteer.jshandle.md
Expand Up @@ -32,7 +32,7 @@ export declare class JSHandle
| --- | --- | --- |
| [asElement()](./puppeteer.jshandle.aselement.md) | | |
| [dispose()](./puppeteer.jshandle.dispose.md) | | The method stops referencing the element handle. |
| [evaluate(pageFunction, args)](./puppeteer.jshandle.evaluate.md) | | This method passes this handle as the first argument to <code>pageFunction</code>. If <code>pageFunction</code> returns a \[Promise\], then <code>handle.evaluate</code> would wait for the promise to resolve and return its value. |
| [evaluate(pageFunction, args)](./puppeteer.jshandle.evaluate.md) | | This method passes this handle as the first argument to <code>pageFunction</code>. If <code>pageFunction</code> returns a Promise, then <code>handle.evaluate</code> would wait for the promise to resolve and return its value. |
| [evaluateHandle(pageFunction, args)](./puppeteer.jshandle.evaluatehandle.md) | | This method passes this handle as the first argument to <code>pageFunction</code>. |
| [executionContext()](./puppeteer.jshandle.executioncontext.md) | | |
| [getProperties()](./puppeteer.jshandle.getproperties.md) | | The method returns a map with property names as keys and JSHandle instances for the property values. |
Expand Down
8 changes: 4 additions & 4 deletions src/common/JSHandle.ts
Expand Up @@ -104,7 +104,7 @@ export class JSHandle {

/**
* This method passes this handle as the first argument to `pageFunction`.
* If `pageFunction` returns a [Promise], then `handle.evaluate` would wait
* If `pageFunction` returns a Promise, then `handle.evaluate` would wait
* for the promise to resolve and return its value.
*
* @example
Expand Down Expand Up @@ -133,7 +133,7 @@ export class JSHandle {
* `evaluateHandle.evaluateHandle` is that `executionContext.evaluateHandle`
* returns in-page object (JSHandle).
*
* If the function passed to the `evaluateHandle.evaluateHandle` returns a [Promise],
* If the function passed to the `evaluateHandle.evaluateHandle` returns a Promise,
* then `evaluateHandle.evaluateHandle` would wait for the promise to resolve and
* return its value.
*
Expand Down Expand Up @@ -760,7 +760,7 @@ export class ElementHandle extends JSHandle {
* the first argument to `pageFunction`. If there's no element matching `selector`,
* the method throws an error.
*
* If `pageFunction` returns a [Promise], then `frame.$eval` would wait for the promise
* If `pageFunction` returns a Promise, then `frame.$eval` would wait for the promise
* to resolve and return its value.
*
* @example
Expand Down Expand Up @@ -793,7 +793,7 @@ export class ElementHandle extends JSHandle {
* the first argument to `pageFunction`. If there's no element matching `selector`,
* the method throws an error.
*
* If `pageFunction` returns a [Promise], then `frame.$$eval` would wait for the
* If `pageFunction` returns a Promise, then `frame.$$eval` would wait for the
* promise to resolve and return its value.
*
* @example
Expand Down

0 comments on commit fe2ac37

Please sign in to comment.