Skip to content

docs(document.hidden): clarify hidden tab versus hidden styling#44622

Merged
hamishwillee merged 2 commits into
mdn:mainfrom
hchiam:hchiam-document.hidden
Jul 2, 2026
Merged

docs(document.hidden): clarify hidden tab versus hidden styling#44622
hamishwillee merged 2 commits into
mdn:mainfrom
hchiam:hchiam-document.hidden

Conversation

@hchiam

@hchiam hchiam commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description/Motivation

  • added clarification to disambiguate between "hidden" in the sense of styling the page you're looking at, versus "hidden" in the sense of the entire tab being not currnetly being viewed by the user
  • added example using polling so beginners can trust/understand it more readily - more likely to know polling and not be familiar with the lesser-known event listener visibilitychange (speaking for myself i guess haha, although i can understand if polling is a reason for not wanting to include the polling example to begin with)

Additional details

@hchiam hchiam requested a review from a team as a code owner July 1, 2026 23:13
@hchiam hchiam requested review from hamishwillee and removed request for a team July 1, 2026 23:13
@github-actions github-actions Bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Preview URLs (1 page)

(comment last updated: 2026-07-02 23:34:13)

@hchiam hchiam left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ready for review

Clarified the explanation of the Document.hidden property and removed outdated example code.
@github-actions github-actions Bot added size/xs [PR only] 0-5 LoC changed and removed size/s [PR only] 6-50 LoC changed labels Jul 2, 2026

@hamishwillee hamishwillee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I agree it doesn't hurt to claify that this is about the page and not a specific visual element.
I've modified to adopt the simple wording of the visibility changed and to remove the example (which doesn't IMO particularly add anything.). It is more clear to say what the property shows that that it is "not styling".

Much appreciated!

@hamishwillee hamishwillee merged commit 54c533a into mdn:main Jul 2, 2026
9 checks passed
@hchiam

hchiam commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

thanks @hamishwillee !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed

3 participants