Re: [w3c/permissions] Define a permission store (closes #384) (PR #390)

@johannhof commented on this pull request.



> +        <p>
+        To <dfn class="export">get a permission store entry</dfn> given a {{PermissionDescriptor}} |descriptor| and [=permission key=] |key|, run these steps:
+          <ol class="algorithm">
+            <li>
+              If the user agent's [=permission store=] [=list/contains=] an [=entry=] whose [=permission store entry/descriptor=] is |descriptor|, and whose [=permission store entry/key=] [=permission key/is equal to=] |key| given |descriptor|, return that entry.
+            </li>
+            <li>
+              Return null.
+            </li>
+          </ol>
+        </p>
+        <p>
+          To <dfn class="export">set a permission store entry</dfn> given a {{PermissionDescriptor}} |descriptor|, a [=permission key=] |key|, and a [=permission/state=] |state|, run these steps:
+          <ol class="algorithm">
+            <li>
+              Let |newEntry| be a new [=permission store entry=] whose [=permission store entry/descriptor=] is |descriptor|, and whose [=permission store entry/key=] [=permission key/is equal to=] |key| given |descriptor|, and whose [=permission store entry/state=] is |state|.

But how do I know which key comparison algorithm to run when I'm not passing the descriptor?

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

Message ID: <w3c/permissions/pull/390/review/1199236731@github.com>

Received on Wednesday, 30 November 2022 12:30:03 UTC