[w3c/permissions] Allowing permission for non-fully-active documents is weird and should be disallowed (#162)

It's possible to invoke methods on objects in windows with no longer fully-active documents, because DOM. Generally, these are edge-cases with few if any use-cases other than exploits.

While individual specs are required to think about such cases, very [few do](https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen).

This presents a unique problem for APIs exposing powerful features behind permissions, because we tie permissions to realms and origins. Specifically, we have to be careful about things like showing the right requesting origin in permission prompts, something that's only guaranteed to make sense from documents that are still [fully active](https://html.spec.whatwg.org/multipage/browsers.html#fully-active).

As an extra safeguard, would it make sense to add prose to the [request permission to use](https://w3c.github.io/permissions/#request-permission-to-use) algorithm to return `"denied"` if the responsible document is no longer *fully active*?

This would expressly forbid powerful features in these edge cases. I can't think of a case where doing so would be a problem.

@jyasskin Thoughts?

-- 
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

Received on Friday, 6 October 2017 18:42:21 UTC