Skip to content

Conversation

@garyb
Copy link
Member

@garyb garyb commented Sep 19, 2022

Description of the change

Adds type and property for page visibility state, as per https://html.spec.whatwg.org/multipage/interaction.html#page-visibility

Also did a little housekeeping while I was in there.


Checklist:

  • Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

Comment on lines 18 to 21
print :: VisibilityState -> String
print = case _ of
Visible -> "loading"
Hidden -> "interactive"
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you clarify where this is stated in the doc you referenced?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, shouldn’t this be “hidden” and “visible”? Reading through the spec I didn’t see mention of these wrt visibility state.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ahem uhm err, I definitely didn't copy and paste this from ReadyState and forget to update these 🤦‍♂️

@JordanMartinez
Copy link
Contributor

The other commits otherwise look fine.

@garyb
Copy link
Member Author

garyb commented Sep 19, 2022

Thanks for taking a look and spotting that! ❤️

@garyb garyb merged commit c7c2169 into master Sep 19, 2022
@garyb garyb deleted the document-visibility-state branch September 19, 2022 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants