-
Notifications
You must be signed in to change notification settings - Fork 24
Add page visibility state functionality #79
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
Conversation
print :: VisibilityState -> String | ||
print = case _ of | ||
Visible -> "loading" | ||
Hidden -> "interactive" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 🤦♂️
The other commits otherwise look fine. |
Thanks for taking a look and spotting that! ❤️ |
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: