Skip to content

Document UserActivation API#21285

Merged
sideshowbarker merged 2 commits intomdn:mainfrom
Elchi3:useractivation-api
Oct 5, 2022
Merged

Document UserActivation API#21285
sideshowbarker merged 2 commits intomdn:mainfrom
Elchi3:useractivation-api

Conversation

@Elchi3
Copy link
Member

@Elchi3 Elchi3 commented Oct 4, 2022

Description

This pull request documents the recent addition of the UserActivation API to the HTML specification. It is specified at https://html.spec.whatwg.org/multipage/interaction.html#the-useractivation-interface and defines 4 new features that need MDN pages:

  • The entry point to UserActivation: navigator.userActivation.
  • A new UserActivation object
  • Two properties on UserActivation: isActive and hasBeenActive.

The API allows you to programmatically read the current window's user activation state.

Motivation

I've recently documented user activation here: https://developer.mozilla.org/en-US/docs/Web/Security/User_activation (per an OWD project proposal, see openwebdocs/project#73).

Additional motivation comes from this being a recent HTML standard addition at whatwg/html#8254 and implementation in Chromiums (and soon WebKittens).

Additional details

I'm not really happy with the example sections. Wasn't sure what to demo exactly. Happy to hear ideas.

Related issues and pull requests

The compat data has been merged already mdn/browser-compat-data#17887
(still being implemented in WebKit, will update when I see a version)

@Elchi3 Elchi3 requested review from a team as code owners October 4, 2022 13:36
@Elchi3 Elchi3 requested review from bsmth and sideshowbarker and removed request for a team October 4, 2022 13:36
@github-actions github-actions bot added Content:Glossary Glossary entries Content:Other Any docs not covered by another "Content:" label Content:WebAPI Web API docs labels Oct 4, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2022

Preview URLs (8 pages)
Flaws (8)

Note! 3 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/UserActivation
Title: UserActivation
Flaw count: 1

  • bad_bcd_queries:
    • No BCD data for query: api.UserActivation

URL: /en-US/docs/Web/API/UserActivation/hasBeenActive
Title: UserActivation.hasBeenActive
Flaw count: 1

  • bad_bcd_queries:
    • No BCD data for query: api.UserActivation.hasBeenActive

URL: /en-US/docs/Web/API/UserActivation/isActive
Title: UserActivation.isActive
Flaw count: 1

  • bad_bcd_queries:
    • No BCD data for query: api.UserActivation.isActive

URL: /en-US/docs/Web/API/Navigator
Title: Navigator
Flaw count: 4

  • macros:
    • /en-US/docs/Web/API/Navigator/securitypolicy does not exist
    • /en-US/docs/Web/API/Navigator/standalone does not exist
  • bad_bcd_links:
    • no explanation!
    • no explanation!

URL: /en-US/docs/Web/API/Navigator/userActivation
Title: Navigator.userActivation
Flaw count: 1

  • bad_bcd_queries:
    • No BCD data for query: api.Navigator.userActivation

(this comment was updated 2022-10-05 06:43:28.348164)

Co-authored-by: Michael[tm] Smith <mike@w3.org>
@sideshowbarker sideshowbarker merged commit 17ef4a8 into mdn:main Oct 5, 2022
@Elchi3 Elchi3 deleted the useractivation-api branch October 5, 2022 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Glossary Glossary entries Content:Other Any docs not covered by another "Content:" label Content:WebAPI Web API docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants