We should create API where sites can query to determine whether they should display various consent banners.
<rdar://problem/69722542>
Created attachment 409927 [details] Patch
Is this based on a spec?
Created attachment 410143 [details] Patch
(In reply to Sam Weinig from comment #3) > Is this based on a spec? No. It is now behind an experimental feature flag which is off by default.
This is quite hard to review without either a spec to follow or some explanation of what the intended behavior is. Can you write up a more detailed explanation about what this is all about? What even is a "consent banner"?
What is the consent for? The API is just "shouldShowConsentBanner()" on Document, but no details on what that means. Also, how does a Document show a consent banner? This is the API for asking if it should. I would have expected the feature to develop the other way around - with the actual consent banner landing first. I think this patch needs a description of what the feature is, and why it is different from the standard permissions API (https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API). Even if it isn't something that can fit in there, it would be worth making this new thing follow the same design as Permissions (you don't ask if you can ask - you would ask if you have consent). In fact, Permissions has a possible value of "prompt", which sounds a lot like what you're asking. One snag is the permissions API is on navigator, whereas this patch is adding to Document.