You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api.md
+42-38Lines changed: 42 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -212,6 +212,9 @@ Indicates that the browser is connected.
212
212
-`deviceScaleFactor` <[number]> Specify device scale factor (can be thought of as dpr). Defaults to `1`.
213
213
-`isMobile` <[boolean]> Whether the `meta viewport` tag is taken into account. Defaults to `false`.
214
214
-`userAgent` <?[string]> Specific user agent to use in this context.
215
+
-`cacheEnabled` <?[boolean]> Toggles HTTP cache in the context. By default HTTP cache is enabled.
216
+
-`interceptNetwork` <?[boolean]> Toggles network interception in the context. Defaults to false.
217
+
-`offlineMode` <?[boolean]> Toggles offline network mode in the context. Defaults to false.
215
218
-`javaScriptEnabled` <?[boolean]> Whether or not to enable or disable JavaScript in the context. Defaults to true.
216
219
-`timezoneId` <?[string]> Changes the timezone of the context. See [ICU’s `metaZones.txt`](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1) for a list of supported timezone IDs.
> **NOTE** Consider using [browserContext.setPermissions](#browsercontextsetpermissions-permissions) to grant permissions for the page to read its geolocation.
355
367
368
+
#### browserContext.setOfflineMode(enabled)
369
+
-`enabled` <[boolean]> When `true`, enables offline mode for the context.
-`origin` <[string]> The [origin] to grant permissions to, e.g. "https://example.com".
358
374
-`permissions` <[Array]<[string]>> An array of permissions to grant. All permissions that are not listed here will be automatically denied. Permissions can be one of the following values:
0 commit comments