Adds fullscreen test, does not increment version number. Tested in Chrome 15, Safari 5.1, Firefox 7 (Yes, Yes, No).
Can you move this out of the core and into a feature-detect folder as a plugin, also webkit right now has two methods one for videos and one for all other elements have a read here.
Basically requestFullScreen is for non video elements and enterFullScreen is for video. I'd want to cover all the bases including the change from FullScreen to Fullscreen.
I had forgotten about enterFullScreen. I think I'll stick that in a separate "video-fullscreen" plugin alongside a fullscreen one because I bet it will become vestigial pretty soon, if it isn't already. Cool?
@brianblakely @ryanseddon @paulirish If Fullscreen has two features, regular and video, maybe we should treat it more like the Video API test? A boolean object: true if both are supported, false if neither, "maybe" if only one of the two, and the properties as:
Is that a clean solution?
I agree on this approach.
Yep that's the same idea i was going to suggest.
there's already a pull request for this from me on nov 4th
added fullscreen test
Merge branch 'master' of github.com:Modernizr/Modernizr
i just pulled in helgri's PR for fullscreen. it matches this one functionally but was set up as a plugin.
on the two checks that faruk suggested.. ryan, is the support of these two methods different? also yeah i expect them to merge into the same method. that just seems sillyyyy.. does the spec give an indication?
Merge pull request #406 from donnut/master
Nokia E52 failed on an undefined style variable
Why are some features tested in core and some as plugins? That's kind of confusing.
The spec does not acknowledge enterFullScreen. I'm surprised Chrome 15's implementation of requestFullScreen works with any element but video.
Based on the spec requestFullscreen() will be the API call and webkits enterFullScreen() should disappear, assuming the spec doesn't change.
Also the current fullscreen plugin detects for the cancelFullScreen() method which is being replaced by exitFullscreen() so that detect will false negative whenever a browser comes along and follows the spec.
Checks for spec property; micro-optimizes loop; adds braces to condit…
mozilla has also chosen cancelFullScreen like webkit; contrary to spec...
I suggest to keep the current code. it's small and working. if browsers will change their implementation I can update the code.
Calc prefix only once for both tests
Probably better to check for both before browsers change or add to their implementations. If, say, Opera should implement the spec verbatim tomorrow, then the plugin will report a false negative.
That is a very likely possibility that Opera would follow the spec as both an Opera employee and Mozilla employee are co-authoring the spec. For now I would probably check for cancel and exit methods.
I guess Opera won't implement it, when it's still a draft. (same with flexbox)
what about testing the pseudo-class :fullscreen? same for all browsers…
There is an issue in Firefox 9. The test returns true, because the the fullscreen api is implemented. But they turned it off, so you actually can call the fullscreen functions, but they don´t do anything. It appears Firefox Team is turning the feature on in Firefox 10.
If the feature is disabled but the API is still available this seems to be just wrong in firefox…
is any part of the api available?
Please see my comment on the gist for issues with FF9: https://gist.github.com/1336232#gistcomment-75712
I made an update on my gist https://gist.github.com/1336232
Now that the fullscreen-test looks pretty good (#739, e1367ce), this PR is pretty outdated and could probably just be closed? :)
Yep, thanks for the nudge.