mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
042d61030c
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
51 lines
629 B
Markdown
51 lines
629 B
Markdown
---
|
|
sidebar_label: Page.setOfflineMode
|
|
---
|
|
|
|
# Page.setOfflineMode() method
|
|
|
|
Sets the network connection to offline.
|
|
|
|
It does not change the parameters used in [Page.emulateNetworkConditions()](./puppeteer.page.emulatenetworkconditions.md)
|
|
|
|
#### Signature:
|
|
|
|
```typescript
|
|
class Page {
|
|
abstract setOfflineMode(enabled: boolean): Promise<void>;
|
|
}
|
|
```
|
|
|
|
## Parameters
|
|
|
|
<table><thead><tr><th>
|
|
|
|
Parameter
|
|
|
|
</th><th>
|
|
|
|
Type
|
|
|
|
</th><th>
|
|
|
|
Description
|
|
|
|
</th></tr></thead>
|
|
<tbody><tr><td>
|
|
|
|
enabled
|
|
|
|
</td><td>
|
|
|
|
boolean
|
|
|
|
</td><td>
|
|
|
|
When `true`, enables offline mode for the page.
|
|
|
|
</td></tr>
|
|
</tbody></table>
|
|
**Returns:**
|
|
|
|
Promise<void>
|