-
Notifications
You must be signed in to change notification settings - Fork 146
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
is_fullscreen() #279
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
We have the ability to
Element::request_fullscreen
, but no way to detect it.This makes it hard to show/hide a fullscreen button.
Goal: Add a sugar function to detect if the window is fullscreen.
Motivation
It's a nightmare to figure out (with browser compatability).
Detailed Explanation
This is a translation of the top stack overflow answer: https://stackoverflow.com/questions/2863351/checking-if-browser-is-in-fullscreen
(web_sys needs Window, Screen)
Drawbacks, Rationale, and Alternatives
Does this design have drawbacks? Are there alternative approaches? Why is this
design the best of all designs available?
What prior art exists?
Unresolved Questions
What is not clear yet? What do we expect to clarify through implementation
and/or usage experience?
I'm not sure where this would fit, API wise. Perhaps in gloo-utils.
My proposal would be to add
gloo_utils::screen
which is short forgloo_utils::window().screen()
. This could provide a wrappedScreen
which mirrors the inner, while providing additional functions such asis_fullscreen()
.The text was updated successfully, but these errors were encountered: