sindresorhus / screenfull

Simple wrapper for cross-browser usage of the JavaScript Fullscreen API
https://sindresorhus.com/screenfull
MIT License
7.08k stars 698 forks source link

Implement Screenfull to Natives #80

Closed nbish11 closed 9 years ago

nbish11 commented 9 years ago

Not really an issue, but what are your thoughts about polyfilling the native elements?

Something like this:

if (typeof Element.prototype.requestFullscreen !== 'function') {
    Element.prototype.requestFullscreen = screenfull.raw.requestFullscreen;
}
kevva commented 9 years ago

-1, overwriting native methods is bad practice