mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore(main): release 18.0.0 (#8981)
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
This commit is contained in:
parent
5a4eb38083
commit
7d6927209e
@ -1,3 +1,3 @@
|
||||
{
|
||||
".": "17.1.3"
|
||||
".": "18.0.0"
|
||||
}
|
||||
|
18
CHANGELOG.md
18
CHANGELOG.md
@ -2,6 +2,24 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
## [18.0.0](https://github.com/puppeteer/puppeteer/compare/v17.1.3...v18.0.0) (2022-09-19)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* fix bounding box visibility conditions (#8954)
|
||||
|
||||
### Features
|
||||
|
||||
* add text query handler ([#8956](https://github.com/puppeteer/puppeteer/issues/8956)) ([633e7cf](https://github.com/puppeteer/puppeteer/commit/633e7cfdf99d42f420d0af381394bd1f6ac7bcd1))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fix bounding box visibility conditions ([#8954](https://github.com/puppeteer/puppeteer/issues/8954)) ([ac9929d](https://github.com/puppeteer/puppeteer/commit/ac9929d80f6f7d4905a39183ae235500e29b4f53))
|
||||
* suppress init errors if the target is closed ([#8947](https://github.com/puppeteer/puppeteer/issues/8947)) ([cfaaa5e](https://github.com/puppeteer/puppeteer/commit/cfaaa5e2c07e5f98baeb7de99e303aa840a351e8))
|
||||
* use win64 version of chromium when on arm64 windows ([#8927](https://github.com/puppeteer/puppeteer/issues/8927)) ([64843b8](https://github.com/puppeteer/puppeteer/commit/64843b88853210314677ab1b434729513ce615a7))
|
||||
|
||||
## [17.1.3](https://github.com/puppeteer/puppeteer/compare/v17.1.2...v17.1.3) (2022-09-08)
|
||||
|
||||
|
||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "puppeteer",
|
||||
"version": "17.1.3",
|
||||
"version": "18.0.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "puppeteer",
|
||||
"version": "17.1.3",
|
||||
"version": "18.0.0",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "puppeteer",
|
||||
"version": "17.1.3",
|
||||
"version": "18.0.0",
|
||||
"description": "A high-level API to control headless Chrome over the DevTools Protocol",
|
||||
"keywords": [
|
||||
"puppeteer",
|
||||
|
@ -1,92 +0,0 @@
|
||||
---
|
||||
sidebar_label: Page.waitForFunction
|
||||
---
|
||||
|
||||
# Page.waitForFunction() method
|
||||
|
||||
Waits for a function to finish evaluating in the page's context.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
class Page {
|
||||
waitForFunction<
|
||||
Params extends unknown[],
|
||||
Func extends EvaluateFunc<Params> = EvaluateFunc<Params>
|
||||
>(
|
||||
pageFunction: Func | string,
|
||||
options?: {
|
||||
timeout?: number;
|
||||
polling?: string | number;
|
||||
},
|
||||
...args: Params
|
||||
): Promise<HandleFor<Awaited<ReturnType<Func>>>>;
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| ------------ | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| pageFunction | Func \| string | Function to be evaluated in browser context |
|
||||
| options | { timeout?: number; polling?: string \| number; } | <p><i>(Optional)</i> Optional waiting parameters</p><p>- <code>polling</code> - An interval at which the <code>pageFunction</code> is executed, defaults to <code>raf</code>. If <code>polling</code> is a number, then it is treated as an interval in milliseconds at which the function would be executed. If polling is a string, then it can be one of the following values: - <code>raf</code> - to constantly execute <code>pageFunction</code> in <code>requestAnimationFrame</code> callback. This is the tightest polling mode which is suitable to observe styling changes. - <code>mutation</code>- to execute pageFunction on every DOM mutation. - <code>timeout</code> - maximum time to wait for in milliseconds. Defaults to <code>30000</code> (30 seconds). Pass <code>0</code> to disable timeout. The default value can be changed by using the [Page.setDefaultTimeout()](./puppeteer.page.setdefaulttimeout.md) method.</p> |
|
||||
| args | Params | Arguments to pass to <code>pageFunction</code> |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Promise<[HandleFor](./puppeteer.handlefor.md)<Awaited<ReturnType<Func>>>>
|
||||
|
||||
A `Promise` which resolves to a JSHandle/ElementHandle of the the `pageFunction`'s return value.
|
||||
|
||||
## Example 1
|
||||
|
||||
The [Page.waitForFunction()](./puppeteer.page.waitforfunction.md) can be used to observe viewport size change:
|
||||
|
||||
```ts
|
||||
const puppeteer = require('puppeteer');
|
||||
(async () => {
|
||||
const browser = await puppeteer.launch();
|
||||
const page = await browser.newPage();
|
||||
const watchDog = page.waitForFunction('window.innerWidth < 100');
|
||||
await page.setViewport({width: 50, height: 50});
|
||||
await watchDog;
|
||||
await browser.close();
|
||||
})();
|
||||
```
|
||||
|
||||
## Example 2
|
||||
|
||||
To pass arguments from node.js to the predicate of [Page.waitForFunction()](./puppeteer.page.waitforfunction.md) function:
|
||||
|
||||
```ts
|
||||
const selector = '.foo';
|
||||
await page.waitForFunction(
|
||||
selector => !!document.querySelector(selector),
|
||||
{},
|
||||
selector
|
||||
);
|
||||
```
|
||||
|
||||
## Example 3
|
||||
|
||||
The predicate of [Page.waitForFunction()](./puppeteer.page.waitforfunction.md) can be asynchronous too:
|
||||
|
||||
```ts
|
||||
const username = 'github-username';
|
||||
await page.waitForFunction(
|
||||
async username => {
|
||||
const githubResponse = await fetch(
|
||||
`https://api.github.com/users/${username}`
|
||||
);
|
||||
const githubUser = await githubResponse.json();
|
||||
// show the avatar
|
||||
const img = document.createElement('img');
|
||||
img.src = githubUser.avatar_url;
|
||||
// wait 3 seconds
|
||||
await new Promise((resolve, reject) => setTimeout(resolve, 3000));
|
||||
img.remove();
|
||||
},
|
||||
{},
|
||||
username
|
||||
);
|
||||
```
|
@ -1,13 +0,0 @@
|
||||
---
|
||||
sidebar_label: Puppeteer._changedProduct
|
||||
---
|
||||
|
||||
# Puppeteer.\_changedProduct property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
class Puppeteer {
|
||||
protected _changedProduct: boolean;
|
||||
}
|
||||
```
|
@ -1,13 +0,0 @@
|
||||
---
|
||||
sidebar_label: Puppeteer._isPuppeteerCore
|
||||
---
|
||||
|
||||
# Puppeteer.\_isPuppeteerCore property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
class Puppeteer {
|
||||
protected _isPuppeteerCore: boolean;
|
||||
}
|
||||
```
|
@ -1,13 +0,0 @@
|
||||
---
|
||||
sidebar_label: PuppeteerNode._preferredRevision
|
||||
---
|
||||
|
||||
# PuppeteerNode.\_preferredRevision property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
class PuppeteerNode {
|
||||
_preferredRevision: string;
|
||||
}
|
||||
```
|
@ -16,5 +16,5 @@ export interface BrowserContextOptions
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| ------------------------------------------------------------------------ | --------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [proxyBypassList?](./puppeteer.browsercontextoptions.proxybypasslist.md) | | string\[\] | <i>(Optional)</i> Bypass the proxy for the given semi-colon-separated list of hosts. |
|
||||
| [proxyBypassList?](./puppeteer.browsercontextoptions.proxybypasslist.md) | | string\[\] | <i>(Optional)</i> Bypass the proxy for the given list of hosts. |
|
||||
| [proxyServer?](./puppeteer.browsercontextoptions.proxyserver.md) | | string | <i>(Optional)</i> Proxy server with optional port to use for all requests. Username and password can be set in <code>Page.authenticate</code>. |
|
@ -4,7 +4,7 @@ sidebar_label: BrowserContextOptions.proxyBypassList
|
||||
|
||||
# BrowserContextOptions.proxyBypassList property
|
||||
|
||||
Bypass the proxy for the given semi-colon-separated list of hosts.
|
||||
Bypass the proxy for the given list of hosts.
|
||||
|
||||
**Signature:**
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user