Callback that is to be triggered within the remove event listener.
Cached element call returning the fullscreen element specific to the clients fullscreen API.
Cached fullscreenchange event function of the clients specific fullscreen API.
Cached exit call of the clients specific fullscreen API.
Cached request call of the clients specific fullscreen API.
Backup of the element's initial width and height.
Event listener used to add the remove event listener using on indirection, that is, the first fullscreen event triggered after a request is ignored. This is important for triggering the fullscreen callback before the request is completed. The listener adds the removeListener and removes itself as listener.
Event listener that is used to account for implicit fullscreen exit events, e.g., user explicitly uses a GUI element for entering fullscreen, but uses ESC to exit fullscreen. The listener triggers the callback provided on toggle and removes itself as listener.
Returns whether or not a fullscreen element exists, indicating if fullscreen is active or not.
Query and cache the client specific fullscreen API.
Requests or exits fullscreen mode for a given element. If the element is already in fullscreen, fullscreen mode is exited. Else, fullscreen mode is requested. The function considers various platform specific fullscreen interfaces, i.e., native, ms, moz, and webkit.
Element to toggle fullscreen state of.
Utility class providing simplified access to the clients fullscreen API. The toggle can be used to toggle fullscreen for a HTML element while managing the execution of custom toggle code.
Use
:fullscreen
(or:-moz-full-screen
,:-webkit-full-screen
, and:-ms-full-screen
) selectors in order to configure fullscreen specific style. Alternatively, an additional class, e.g.,fullscreen
, could be toggled via callaback.