Skip to content

Commit

Permalink
feat: support userContext is setPermission (#2033)
Browse files Browse the repository at this point in the history
- keep the prefixed version to maintain compatibility with Puppeteer

---------

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
OrKoN committed Mar 20, 2024
1 parent 08e865b commit 3186576
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/bidiMapper/domains/permissions/PermissionsProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export class PermissionsProcessor {
params: Permissions.SetPermissionParameters
): Promise<EmptyResult> {
try {
const userContextId = (params as {'goog:userContext'?: string})[
'goog:userContext'
];
const userContextId =
(params as {'goog:userContext'?: string})['goog:userContext'] ||
params.userContext;
await this.#browserCdpClient.sendCommand('Browser.setPermission', {
origin: params.origin,
browserContextId:
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 3186576

Please sign in to comment.