Re: [w3c/permissions] Granting permission to non-fully-active documents is weird and should be disallowed (#162)

This thread is talking about "fully active" state changing due to the document getting detached. For that case, not allowing to query permissions seems reasonable. There's another way for the "fully active" state to change: the user navigated away and the page gets into the back/forward cache (see [article](https://web.dev/bfcache/), [guide](https://github.com/w3ctag/design-principles/pull/317)). When that happens, the page can't run script so querying permissions is not possible and should not be a problem.

However, there's also the "permission status change" event which I think this thread hasn't talked about, but is being updated in @marcoscaceres' PR: https://github.com/w3c/permissions/pull/249 . I'm not really sure when this will be triggered - is it possible for this to be triggered by another frame/page? If so we need to decide whether we should "drop" these changes (never send the "change" event, so when the document becomes fully active again it needs to proactively query the current state of things), or update the frame/page with the latest state when it becomes fully active again if any change has happened while it's not fully active (Note that this should update the document with the "latest status" instead of a full queue of events. See last paragraph of [2.8.2](https://pr-preview.s3.amazonaws.com/w3ctag/design-principles/317/b295eb7...rakina:79aa652.html#listen-fully-active) for more details)

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

Received on Wednesday, 14 July 2021 05:06:04 UTC