fullscreen polyfill api that presents an event emitter
polyfill for requestFullscreen
var fullscreen = require'fullscreen'el = documentgetElementById'element'fsfs = fullscreeneleladdEventListener'click'fsrequestfsreleasefson'attain'// attained fullscreenfson'release'// released fullscreenfson'error'// fullscreen request failed, or// fullscreen isn't supported
return a boolean yes/no for whether fullscreen api is supported.
return a fullscreen event emitter object. if fullscreen is not
available, on the next turn of the event loop it'll emit
issue a request for fullscreen. if it's accepted, it emits
'error' for denial.
release the current fullscreen element. if the fullscreen is released, it emits
removes any event listeners created by the
fs instance once you're done with it.
returns the current fullscreen target, if any.