- From: Johann Hofmann <notifications@github.com>
- Date: Thu, 01 Dec 2022 10:49:40 -0800
- To: w3c/permissions <permissions@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/permissions/pull/390/review/1201510013@github.com>
@johannhof 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. Hmm, that's an interesting question. I think returning null here is really to be explicit that there's no entry, and I figured that defaulting to "prompt" (or something else) would be done when computing the permission state when there's no explicit entry in the store (e.g. in step 8 [here](https://pr-preview.s3.amazonaws.com/johannhof/permissions/pull/390.html#dfn-permission-state)) -- Reply to this email directly or view it on GitHub: https://github.com/w3c/permissions/pull/390#discussion_r1037457717 You are receiving this because you are subscribed to this thread. Message ID: <w3c/permissions/pull/390/review/1201510013@github.com>
Received on Thursday, 1 December 2022 18:49:53 UTC