chrisdickinson / fullscreen

fullscreen polyfill api that presents an event emitter
36 stars 19 forks source link

JS error when full screen is not supported #7

Open catalinux opened 8 years ago

catalinux commented 8 years ago

On IOS Safari I get the following error: Received ERROR:TypeError: undefined is not an object (evaluating 'rfs.apply'), undefined:50

Shouldn't throw an errror that would be caught with:

fs.on('error', function() {
});
ggingell commented 7 years ago

This is probably not much of an issue anymore. However the error is still possible if you don't check isEnabled before calling .request() and the browser does not support the element level API.

See diff https://github.com/chrisdickinson/fullscreen/pull/13/commits/f7b771814cc1d028020445544fdc4fa3d962701c with the fix for this issue. I'll merge it by the end of this week.