docs: replace evaluateHandle with evaluate in the evaluate page (#10439)
This commit is contained in:
parent
42bdfa20d7
commit
a88d1936ca
@ -6,7 +6,7 @@ sidebar_label: Page.evaluate
|
|||||||
|
|
||||||
Evaluates a function in the page's context and returns the result.
|
Evaluates a function in the page's context and returns the result.
|
||||||
|
|
||||||
If the function passed to `page.evaluateHandle` returns a Promise, the function will wait for the promise to resolve and return its value.
|
If the function passed to `page.evaluate` returns a Promise, the function will wait for the promise to resolve and return its value.
|
||||||
|
|
||||||
#### Signature:
|
#### Signature:
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ page.off('request', logRequest);
|
|||||||
| [emulateNetworkConditions(networkConditions)](./puppeteer.page.emulatenetworkconditions.md) | | <p>This does not affect WebSockets and WebRTC PeerConnections (see https://crbug.com/563644). To set the page offline, you can use [Page.setOfflineMode()](./puppeteer.page.setofflinemode.md).</p><p>A list of predefined network conditions can be used by importing [PredefinedNetworkConditions](./puppeteer.predefinednetworkconditions.md).</p> |
|
| [emulateNetworkConditions(networkConditions)](./puppeteer.page.emulatenetworkconditions.md) | | <p>This does not affect WebSockets and WebRTC PeerConnections (see https://crbug.com/563644). To set the page offline, you can use [Page.setOfflineMode()](./puppeteer.page.setofflinemode.md).</p><p>A list of predefined network conditions can be used by importing [PredefinedNetworkConditions](./puppeteer.predefinednetworkconditions.md).</p> |
|
||||||
| [emulateTimezone(timezoneId)](./puppeteer.page.emulatetimezone.md) | | |
|
| [emulateTimezone(timezoneId)](./puppeteer.page.emulatetimezone.md) | | |
|
||||||
| [emulateVisionDeficiency(type)](./puppeteer.page.emulatevisiondeficiency.md) | | Simulates the given vision deficiency on the page. |
|
| [emulateVisionDeficiency(type)](./puppeteer.page.emulatevisiondeficiency.md) | | Simulates the given vision deficiency on the page. |
|
||||||
| [evaluate(pageFunction, args)](./puppeteer.page.evaluate.md) | | <p>Evaluates a function in the page's context and returns the result.</p><p>If the function passed to <code>page.evaluateHandle</code> returns a Promise, the function will wait for the promise to resolve and return its value.</p> |
|
| [evaluate(pageFunction, args)](./puppeteer.page.evaluate.md) | | <p>Evaluates a function in the page's context and returns the result.</p><p>If the function passed to <code>page.evaluate</code> returns a Promise, the function will wait for the promise to resolve and return its value.</p> |
|
||||||
| [evaluateHandle(pageFunction, args)](./puppeteer.page.evaluatehandle.md) | | |
|
| [evaluateHandle(pageFunction, args)](./puppeteer.page.evaluatehandle.md) | | |
|
||||||
| [evaluateOnNewDocument(pageFunction, args)](./puppeteer.page.evaluateonnewdocument.md) | | <p>Adds a function which would be invoked in one of the following scenarios:</p><p>- whenever the page is navigated</p><p>- whenever the child frame is attached or navigated. In this case, the function is invoked in the context of the newly attached frame.</p><p>The function is invoked after the document was created but before any of its scripts were run. This is useful to amend the JavaScript environment, e.g. to seed <code>Math.random</code>.</p> |
|
| [evaluateOnNewDocument(pageFunction, args)](./puppeteer.page.evaluateonnewdocument.md) | | <p>Adds a function which would be invoked in one of the following scenarios:</p><p>- whenever the page is navigated</p><p>- whenever the child frame is attached or navigated. In this case, the function is invoked in the context of the newly attached frame.</p><p>The function is invoked after the document was created but before any of its scripts were run. This is useful to amend the JavaScript environment, e.g. to seed <code>Math.random</code>.</p> |
|
||||||
| [exposeFunction(name, pptrFunction)](./puppeteer.page.exposefunction.md) | | <p>The method adds a function called <code>name</code> on the page's <code>window</code> object. When called, the function executes <code>puppeteerFunction</code> in node.js and returns a <code>Promise</code> which resolves to the return value of <code>puppeteerFunction</code>.</p><p>If the puppeteerFunction returns a <code>Promise</code>, it will be awaited.</p><p>:::note</p><p>Functions installed via <code>page.exposeFunction</code> survive navigations.</p><p>:::note</p> |
|
| [exposeFunction(name, pptrFunction)](./puppeteer.page.exposefunction.md) | | <p>The method adds a function called <code>name</code> on the page's <code>window</code> object. When called, the function executes <code>puppeteerFunction</code> in node.js and returns a <code>Promise</code> which resolves to the return value of <code>puppeteerFunction</code>.</p><p>If the puppeteerFunction returns a <code>Promise</code>, it will be awaited.</p><p>:::note</p><p>Functions installed via <code>page.exposeFunction</code> survive navigations.</p><p>:::note</p> |
|
||||||
|
@ -2108,7 +2108,7 @@ export class Page extends EventEmitter {
|
|||||||
/**
|
/**
|
||||||
* Evaluates a function in the page's context and returns the result.
|
* Evaluates a function in the page's context and returns the result.
|
||||||
*
|
*
|
||||||
* If the function passed to `page.evaluateHandle` returns a Promise, the
|
* If the function passed to `page.evaluate` returns a Promise, the
|
||||||
* function will wait for the promise to resolve and return its value.
|
* function will wait for the promise to resolve and return its value.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
|
Loading…
Reference in New Issue
Block a user