Skip to content

Commit

Permalink
Remove invalid link around webworker docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfranklin committed Jun 19, 2020
1 parent 158a4c1 commit 265fc76
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion new-docs/puppeteer.webworker.evaluatehandle.md
Expand Up @@ -4,7 +4,7 @@

## WebWorker.evaluateHandle() method

The only difference between `worker.evaluate` and `worker.evaluateHandle` is that `worker.evaluateHandle` returns in-page object (JSHandle). If the function passed to the `worker.evaluateHandle` returns a \[Promise\], then `worker.evaluateHandle` would wait for the promise to resolve and return its value. Shortcut for \[(await worker.executionContext()).evaluateHandle(pageFunction, ...args)\](\#executioncontextevaluatehandlepagefunction-args).
The only difference between `worker.evaluate` and `worker.evaluateHandle` is that `worker.evaluateHandle` returns in-page object (JSHandle). If the function passed to the `worker.evaluateHandle` returns a \[Promise\], then `worker.evaluateHandle` would wait for the promise to resolve and return its value. Shortcut for `await worker.executionContext()).evaluateHandle(pageFunction, ...args)`

<b>Signature:</b>

Expand Down
2 changes: 1 addition & 1 deletion new-docs/puppeteer.webworker.md
Expand Up @@ -46,7 +46,7 @@ for (const worker of page.workers()) {
| Method | Modifiers | Description |
| --- | --- | --- |
| [evaluate(pageFunction, args)](./puppeteer.webworker.evaluate.md) | | If the function passed to the <code>worker.evaluate</code> returns a Promise, then <code>worker.evaluate</code> would wait for the promise to resolve and return its value. If the function passed to the <code>worker.evaluate</code> returns a non-serializable value, then <code>worker.evaluate</code> resolves to <code>undefined</code>. DevTools Protocol also supports transferring some additional values that are not serializable by <code>JSON</code>: <code>-0</code>, <code>NaN</code>, <code>Infinity</code>, <code>-Infinity</code>, and bigint literals. Shortcut for <code>await worker.executionContext()).evaluate(pageFunction, ...args)</code>. |
| [evaluateHandle(pageFunction, args)](./puppeteer.webworker.evaluatehandle.md) | | The only difference between <code>worker.evaluate</code> and <code>worker.evaluateHandle</code> is that <code>worker.evaluateHandle</code> returns in-page object (JSHandle). If the function passed to the <code>worker.evaluateHandle</code> returns a \[Promise\], then <code>worker.evaluateHandle</code> would wait for the promise to resolve and return its value. Shortcut for \[(await worker.executionContext()).evaluateHandle(pageFunction, ...args)\](\#executioncontextevaluatehandlepagefunction-args). |
| [evaluateHandle(pageFunction, args)](./puppeteer.webworker.evaluatehandle.md) | | The only difference between <code>worker.evaluate</code> and <code>worker.evaluateHandle</code> is that <code>worker.evaluateHandle</code> returns in-page object (JSHandle). If the function passed to the <code>worker.evaluateHandle</code> returns a \[Promise\], then <code>worker.evaluateHandle</code> would wait for the promise to resolve and return its value. Shortcut for <code>await worker.executionContext()).evaluateHandle(pageFunction, ...args)</code> |
| [executionContext()](./puppeteer.webworker.executioncontext.md) | | Returns the ExecutionContext the WebWorker runs in |
| [url()](./puppeteer.webworker.url.md) | | |

2 changes: 1 addition & 1 deletion src/common/WebWorker.ts
Expand Up @@ -146,7 +146,7 @@ export class WebWorker extends EventEmitter {
* function passed to the `worker.evaluateHandle` returns a [Promise], then
* `worker.evaluateHandle` would wait for the promise to resolve and return
* its value. Shortcut for
* `await worker.executionContext()).evaluateHandle(pageFunction, * ...args)`
* `await worker.executionContext()).evaluateHandle(pageFunction, ...args)`
*
* @param pageFunction - Function to be evaluated in the page context.
* @param args - Arguments to pass to `pageFunction`.
Expand Down
6 changes: 3 additions & 3 deletions src/initialize.ts
Expand Up @@ -64,9 +64,9 @@ export const initializePuppeteer = (options: InitOptions): Puppeteer => {
product
);

// The introspection in `Helper.installAsyncStackHooks` references `Puppeteer._launcher`
// before the Puppeteer ctor is called, such that an invalid Launcher is selected at import,
// so we reset it.
// The introspection in `Helper.installAsyncStackHooks` references
// `Puppeteer._launcher` before the Puppeteer ctor is called, such that an
// invalid Launcher is selected at import, so we reset it.
puppeteer._lazyLauncher = undefined;
return puppeteer;
};

0 comments on commit 265fc76

Please sign in to comment.