Skip to content

Commit c89ece1

Browse files
committed
chore: allow local-network-access permission in chromium
Fixes #37861
1 parent 7fbba75 commit c89ece1

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

docs/src/api/class-browsercontext.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,14 +948,15 @@ Here are some permissions that may be supported by some browsers:
948948
* `'clipboard-write'`
949949
* `'geolocation'`
950950
* `'gyroscope'`
951+
* `'local-fonts'`
952+
* `'local-network-access'`
951953
* `'magnetometer'`
952954
* `'microphone'`
953955
* `'midi-sysex'` (system-exclusive midi)
954956
* `'midi'`
955957
* `'notifications'`
956958
* `'payment-handler'`
957959
* `'storage-access'`
958-
* `'local-fonts'`
959960

960961
### option: BrowserContext.grantPermissions.origin
961962
* since: v1.8

packages/playwright-client/types/types.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8991,14 +8991,15 @@ export interface BrowserContext {
89918991
* - `'clipboard-write'`
89928992
* - `'geolocation'`
89938993
* - `'gyroscope'`
8994+
* - `'local-fonts'`
8995+
* - `'local-network-access'`
89948996
* - `'magnetometer'`
89958997
* - `'microphone'`
89968998
* - `'midi-sysex'` (system-exclusive midi)
89978999
* - `'midi'`
89989000
* - `'notifications'`
89999001
* - `'payment-handler'`
90009002
* - `'storage-access'`
9001-
* - `'local-fonts'`
90029003
* @param options
90039004
*/
90049005
grantPermissions(permissions: ReadonlyArray<string>, options?: {

packages/playwright-core/src/server/chromium/crBrowser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ export class CRBrowserContext extends BrowserContext {
435435
['midi-sysex', 'midiSysex'],
436436
['storage-access', 'storageAccess'],
437437
['local-fonts', 'localFonts'],
438+
['local-network-access', 'localNetworkAccess'],
438439
]);
439440
const filtered = permissions.map(permission => {
440441
const protocolPermission = webPermissionToProtocol.get(permission);

packages/playwright-core/types/types.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8991,14 +8991,15 @@ export interface BrowserContext {
89918991
* - `'clipboard-write'`
89928992
* - `'geolocation'`
89938993
* - `'gyroscope'`
8994+
* - `'local-fonts'`
8995+
* - `'local-network-access'`
89948996
* - `'magnetometer'`
89958997
* - `'microphone'`
89968998
* - `'midi-sysex'` (system-exclusive midi)
89978999
* - `'midi'`
89989000
* - `'notifications'`
89999001
* - `'payment-handler'`
90009002
* - `'storage-access'`
9001-
* - `'local-fonts'`
90029003
* @param options
90039004
*/
90049005
grantPermissions(permissions: ReadonlyArray<string>, options?: {

0 commit comments

Comments
 (0)