Skip to content
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

Document that screenfull can be false #142

Closed
s-h-a-d-o-w opened this issue Jun 15, 2019 · 1 comment · Fixed by #154
Closed

Document that screenfull can be false #142

s-h-a-d-o-w opened this issue Jun 15, 2019 · 1 comment · Fixed by #154

Comments

@s-h-a-d-o-w
Copy link
Contributor

s-h-a-d-o-w commented Jun 15, 2019

Trying to use the new types has made me aware of this fact. It seems that wherever you use screenfull, you should actually wrap the block in a if (screenfull).

Or of course use if (screenfull && screenfull.enabled).
Which might also clear up this confusion.

Or... if a browser doesn't support full screen at all, don't return false but instead {enabled: false}.

@sindresorhus
Copy link
Owner

Or... if a browser doesn't support full screen at all, don't return false but instead {enabled: false}.

Yeah, that would be nicer.

s-h-a-d-o-w added a commit to s-h-a-d-o-w/screenfull.js that referenced this issue Aug 3, 2019
screenfull now always provides an object that at least contains
`enabled`, making a seperate check for `screenfull` being `false`
unnecessary.

Fixes sindresorhus#142
s-h-a-d-o-w added a commit to s-h-a-d-o-w/screenfull.js that referenced this issue Sep 8, 2019
screenfull now always provides an object that at least contains
`enabled`, making a seperate check for `screenfull` being `false`
unnecessary.

Fixes sindresorhus#142
s-h-a-d-o-w added a commit to s-h-a-d-o-w/screenfull.js that referenced this issue Sep 8, 2019
screenfull now always provides an object that at least contains
`enabled`, making a seperate check for `screenfull` being `false`
unnecessary.

Fixes sindresorhus#142
s-h-a-d-o-w added a commit to s-h-a-d-o-w/screenfull.js that referenced this issue Sep 8, 2019
screenfull now always provides an object that at least contains
`enabled`, making a seperate check for `screenfull` being `false`
unnecessary.

Fixes sindresorhus#142
s-h-a-d-o-w added a commit to s-h-a-d-o-w/screenfull.js that referenced this issue Sep 8, 2019
screenfull now always provides an object that at least contains
`enabled`, making a seperate check for `screenfull` being `false`
unnecessary.

Fixes sindresorhus#142
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants