- From: Mike Taylor <notifications@github.com>
- Date: Thu, 01 Dec 2022 06:23:38 -0800
- To: w3c/permissions <permissions@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/permissions/pull/390/review/1201065620@github.com>
@miketaylr commented on this pull request. > + The user agent maintains a single <dfn class="export">permission store</dfn> which is a [=/list=] of [=permission store entries=]. + </p> + <p> + The user agent MAY remove [=entries=] from the [=permission store=] when their respective [=permission=]'s [=permission/lifetime=] has expired. + </p> + <p> + A <dfn class="export" data-local-lt="entry">permission store entry</dfn> is a [=tuple=] of {{PermissionDescriptor}} <dfn class="export" data-dfn-for="permission store entry">descriptor</dfn>, [=permission key=] <dfn class="export" data-dfn-for="permission store entry">key</dfn>, and [=permission/state=] <dfn class="export" data-dfn-for="permission store entry">state</dfn>. + </p> + <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. Question here, and generally: do you envision the permission store "bootstrapped" with entries for each supported feature w/ the default permission state ("prompt")? Or do you remove the entry when state is removed/ungranted? If the former, we would only return null if the descriptor/key was nonsense, right? > @@ -278,6 +278,71 @@ <h3> reset because its [=permission/lifetime=] has expired. </p> </section> + <section> + <h3> + Permission Store + </h3> + <p> + The user agent maintains a single <dfn class="export">permission store</dfn> which is a [=/list=] of [=permission store entries=]. I'm still digesting the PR, but I think a set would work? -- Reply to this email directly or view it on GitHub: https://github.com/w3c/permissions/pull/390#pullrequestreview-1201065620 You are receiving this because you are subscribed to this thread. Message ID: <w3c/permissions/pull/390/review/1201065620@github.com>
Received on Thursday, 1 December 2022 14:23:51 UTC