Re: [w3c/permissions] Add an optional `topLevelOrigin` parameter to the `permissions.setPermission` command (PR #468)

jalonthomas left a comment (w3c/permissions#468)

> I don't follow here - in https://pr-preview.s3.amazonaws.com/w3c/permissions/468/4f2ccb0...jalonthomas:4841693.html#automation you're calling the permission key generation algorithm with a [current settings object](https://html.spec.whatwg.org/multipage/webappapis.html#current-settings-object). So why do we need to modify the permission key generation algorithm? When does WebDriver have a CSO (which is a type of ESO) but not an ESO?

My understanding is that WebDriver _doesn’t_ have an ESO at all. By modifying the permission key generation algorithm to take an origin and a top-level origin directly, it's now possible for WebDriver to call the algorithm and set permissions without needing an ESO..

> Dumb question: why not just add an additional optional top-level origin argument into "set a permission" and plumb that in?

This is definitely a possibility, but the optional origin before functionally _was_ the key. So rather than pass both origins, I think it makes sense to consolidate under a single permission key input, and have the callers generate that key themselves.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/pull/468#issuecomment-3229650357
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/permissions/pull/468/c3229650357@github.com>

Received on Wednesday, 27 August 2025 20:29:09 UTC