Re: [w3c/permissions] Add "popups" permission type (#210)

@domenic, @annevk, I think this ⬆️ is really a HTML question (as it relates to `window.open()`)... Popups kinda meet the definition of "powerful feature", in the they require express user permission to be shown when popup blocking. An it may be helpful for developers to know if their popups would otherwise be denied from popping up.... I wonder if there is something here with considering? 

Having said that, there are strong mitigations in place to prevent popups without a user gesture. So, the question is: is it possible to fully block all popups, irrespective of transient activation. And if so, would exposing the permission state of "popups" be worth while? 

```JS
// can I pop up windows?
const status = await permissions.query({ name: "popup" });
if (status.state === "granted") 
  window.open("page")
else 
   // make an in-page popup, or navigate...
``` 

 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/issues/210#issuecomment-1034511828

You are receiving this because you are subscribed to this thread.

Message ID: <w3c/permissions/issues/210/1034511828@github.com>

Received on Thursday, 10 February 2022 05:35:40 UTC