Pages
Mint Fullscreen
Mint wrapper for the browser Fullscreen API
Example
Example of using the Fullscreen module
component Main {
fun enter {
case target {
Maybe::Just(el) =>
{
Fullscreen.enter(el)
void
}
=> void
}
}
fun exit {
Fullscreen.exit()
}
fun render {
<div as target>
<button onClick={enter}>
"enter fullscreen"
</button>
<button onClick={exit}>
"exit fullscreen"
</button>
</div>
}
}
Functions
The Fullscreen module
enter(el : Dom.Element)- Requests to enter fullscreen modeexit()- Requests to leave fullscreen modeelement() : Maybe(Dom.Element)- Returns the active fullscreen elementisAvailable() : Bool- Is the Fullscreen API available to use in the browserisActive() : Bool- Is fullscreen mode currently activated on an element