[w3c/permissions] WebDriver BiDi: permissions.setPermission does not define an error for an unknown userContext (Issue #486)

whimboo created an issue (w3c/permissions#486)

The [remote end steps for `permissions.setPermission`](https://w3c.github.io/permissions/#webdriver-bidi-command-permissions-setPermission) contain:

> Let |user agent| be the user agent that represents the user context with the id |user context id|.

They do not say what happens if no user context with that ID exists.

Other WebDriver BiDi commands that take a `userContext` parameter return a `no such user context` error in this case, for example `browsingContext.create` and `storage.getCookies`. Firefox already returns `no such user context` for `permissions.setPermission`. MDN also documents this error, even though the spec does not define it (https://github.com/mdn/content/pull/46230).

Proposal: add a step after |user context id| is read:

> If there is no user context with the id |user context id|, return error with error code `no such user context`.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/issues/486
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/permissions/issues/486@github.com>

Received on Wednesday, 28 October 2026 17:06:02 UTC