mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
refactor!: remove networkConditions in favor of PredefinedNetworkConditions (#11806)
This commit is contained in:
parent
84d9a94d62
commit
7564dfa911
@ -160,7 +160,6 @@ sidebar_label: API
|
|||||||
| [KnownDevices](./puppeteer.knowndevices.md) | A list of devices to be used with [Page.emulate()](./puppeteer.page.emulate.md). |
|
| [KnownDevices](./puppeteer.knowndevices.md) | A list of devices to be used with [Page.emulate()](./puppeteer.page.emulate.md). |
|
||||||
| [launch](./puppeteer.launch.md) | |
|
| [launch](./puppeteer.launch.md) | |
|
||||||
| [MouseButton](./puppeteer.mousebutton.md) | Enum of valid mouse buttons. |
|
| [MouseButton](./puppeteer.mousebutton.md) | Enum of valid mouse buttons. |
|
||||||
| [networkConditions](./puppeteer.networkconditions.md) | |
|
|
||||||
| [PredefinedNetworkConditions](./puppeteer.predefinednetworkconditions.md) | A list of network conditions to be used with [Page.emulateNetworkConditions()](./puppeteer.page.emulatenetworkconditions.md). |
|
| [PredefinedNetworkConditions](./puppeteer.predefinednetworkconditions.md) | A list of network conditions to be used with [Page.emulateNetworkConditions()](./puppeteer.page.emulatenetworkconditions.md). |
|
||||||
| [puppeteer](./puppeteer.puppeteer.md) | |
|
| [puppeteer](./puppeteer.puppeteer.md) | |
|
||||||
| [trimCache](./puppeteer.trimcache.md) | |
|
| [trimCache](./puppeteer.trimcache.md) | |
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
---
|
---
|
||||||
sidebar_label: networkConditions
|
sidebar_label: NetworkConditions
|
||||||
---
|
---
|
||||||
|
|
||||||
# networkConditions variable
|
# NetworkConditions interface
|
||||||
|
|
||||||
> Warning: This API is now obsolete.
|
|
||||||
>
|
|
||||||
> Import [PredefinedNetworkConditions](./puppeteer.predefinednetworkconditions.md).
|
|
||||||
|
|
||||||
#### Signature:
|
#### Signature:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
networkConditions: Readonly<{
|
export interface NetworkConditions
|
||||||
'Slow 3G': NetworkConditions;
|
|
||||||
'Fast 3G': NetworkConditions;
|
|
||||||
}>;
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
| Property | Modifiers | Type | Description | Default |
|
||||||
|
| -------- | --------- | ------ | ----------- | ------- |
|
||||||
|
| download | | number | | |
|
||||||
|
| latency | | number | | |
|
||||||
|
| upload | | number | | |
|
||||||
|
@ -40,10 +40,3 @@ export const PredefinedNetworkConditions = Object.freeze({
|
|||||||
latency: 150 * 3.75,
|
latency: 150 * 3.75,
|
||||||
} as NetworkConditions,
|
} as NetworkConditions,
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Import {@link PredefinedNetworkConditions}.
|
|
||||||
*
|
|
||||||
* @public
|
|
||||||
*/
|
|
||||||
export const networkConditions = PredefinedNetworkConditions;
|
|
||||||
|
Loading…
Reference in New Issue
Block a user