-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An MDN page that lists all the web APIs gated by user activation #73
Comments
Is it something like https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts/features_restricted_to_secure_contexts#secure_context_restrictions_that_vary_by_browser but for user-gesture requirement? |
Yes, that is pretty much what I had in mind. |
Thanks for your issue! I created a PR mdn/content#20358 and it would be great if it could be expanded if any of you have additional information. |
This is great! The next step would be to add information about differences between browsers. For example, Clipboard.writeText() requires activation in Safari and Firefox, but not in Chromium-based browsers (see w3c/clipboard-apis#182). Ideally, browser vendors themselves would document these details on MDN. |
I added Clipboard.writeText() to the PR and will ask around if anyone (especially browser vendor folks) have more to share. Meanwhile it was also proposed we update each affected API page to mention user activation. I think it is a good idea. |
Yes, I think some consistent note card or banner would be good. It's not yet based on data unfortunately. The browser-compat-data (BCD) project is thinking about adding secure context data, though, see #102. A project to generate MDN banners from data is filed here: #81 (for the "experimental" status for a start). |
An MDN page listing the APIs was created in mdn/content#20358 Thanks again for this great suggestion! 👍 |
About user activation: https://html.spec.whatwg.org/multipage/interaction.html#tracking-user-activation
Web developers might find it useful if there was a page on MDN that lists all the web APIs that can only be called in response to a user action (e.g., a button press). One such API is
navigator.share()
. There are probably some differences between browsers, so that could be documented as well.The text was updated successfully, but these errors were encountered: