import m from '@garage44/mithril' // The page follows the browser's own leaving of full screen (Esc, a back gesture). document.addEventListener('fullscreenchange', () => m.redraw()) /** * Full screen and back, for a phone's browser bars. A browser that cannot * (Safari on an iPhone gives it only to videos) shows no button. */ export function fullscreenButton(): m.Vnode | null { if (!document.fullscreenEnabled) return null const on = !!document.fullscreenElement return ( ) }