[w3c/permissions] Use embeddedOrigin instead of topLevelOrigin in setPermission (PR #469)

For most permissions, 'origin' is interpreted as the top-level origin. To align with that, 'origin' in the setPermission command should correspond to the top-level (embedding) origin. This change enforces that fact and makes the second origin parameter the embedded (requesting) origin. We also need to change the key generation algorithm to reflect this swap of parameters.


<!--
    This comment and the below content is programmatically generated.
    You may add a comma-separated list of anchors you'd like a
    direct link to below (e.g. #idl-serializers, #idl-sequence):

    Don't remove this comment or modify anything below this line.
    If you don't want a preview generated for this pull request,
    just replace the whole of this comment's content by "no preview"
    and remove what's below.
-->
***
<a href="https://pr-preview.s3.amazonaws.com/jalonthomas/permissions/pull/469.html" title="Last updated on Oct 1, 2025, 2:53 PM UTC (bb47617)">Preview</a> | <a href="https://pr-preview.s3.amazonaws.com/w3c/permissions/469/a867a0e...jalonthomas:bb47617.html" title="Last updated on Oct 1, 2025, 2:53 PM UTC (bb47617)">Diff</a>
You can view, comment on, or merge this pull request online at:

  https://github.com/w3c/permissions/pull/469

-- Commit Summary --

  * Use embeddedOrigin instead of topLevelOrigin

-- File Changes --

    M index.html (27)

-- Patch Links --

https://github.com/w3c/permissions/pull/469.patch
https://github.com/w3c/permissions/pull/469.diff

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

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

Received on Wednesday, 1 October 2025 14:53:46 UTC