Audience
Anyone searching for a cross-browser solution to fullscreen pages and elements
About Screenfull.js
Simple wrapper for cross-browser usage of the JavaScript Fullscreen API, which lets you bring the page or any element into fullscreen. Smoothens out the browser implementation differences, so you don't have to. If you cannot use ESM or need to support older browsers without using transpilation, use version 5.2.0. Only 0.7 kB gzipped. Also available on cdnjs (older version). Safari is supported on desktops and iPad, but not on iPhones. This is a limitation in the browser, not in Screenfull. Fullscreen the page or fullscreen an element. Hide the navigation user interface on mobile devices. Fullscreen an element with jQuery and toggle fullscreen on an image with jQuery. Detect fullscreen change, remove listeners, detect fullscreen errors, and fullscreen elements with Angular.js. Keep in mind that the browser will only enter fullscreen when initiated by user events like click, touch, or key.