Skip to content
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

Closed
simevidas opened this issue Dec 31, 2021 · 8 comments
Closed

An MDN page that lists all the web APIs gated by user activation #73

simevidas opened this issue Dec 31, 2021 · 8 comments
Assignees
Labels
proposal (actionable) Enough information is provided and the work is scoped well. Actionable but not prioritized right now

Comments

@simevidas
Copy link

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.

@myakura
Copy link

myakura commented Jan 5, 2022

@simevidas
Copy link
Author

Yes, that is pretty much what I had in mind.

@Elchi3
Copy link
Member

Elchi3 commented Sep 6, 2022

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.

@simevidas
Copy link
Author

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.

@Elchi3
Copy link
Member

Elchi3 commented Sep 7, 2022

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.

@Elchi3 Elchi3 added the proposal (actionable) Enough information is provided and the work is scoped well. Actionable but not prioritized right now label Sep 7, 2022
@Elchi3 Elchi3 self-assigned this Sep 7, 2022
@simevidas
Copy link
Author

simevidas commented Sep 7, 2022

Maybe a note card at the top, like the one for secure context? I really hope that this card is stored in a single place and dynamically inserted to the page based on a flag, and not manually copy-pasted to each page.

Screenshot 2022-09-07 at 13 27 31

@Elchi3
Copy link
Member

Elchi3 commented Sep 7, 2022

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

@Elchi3
Copy link
Member

Elchi3 commented Sep 22, 2022

An MDN page listing the APIs was created in mdn/content#20358
The API pages have been updated so they all mention user activation in mdn/content#20435

Thanks again for this great suggestion! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal (actionable) Enough information is provided and the work is scoped well. Actionable but not prioritized right now
Projects
None yet
Development

No branches or pull requests

3 participants