https://github.com/farism/mint-fullscreen
Mint lang wrapper for the browser Fullscreen API
https://github.com/farism/mint-fullscreen
fullscreen-api mint mint-lang
Last synced: about 2 months ago
JSON representation
Mint lang wrapper for the browser Fullscreen API
- Host: GitHub
- URL: https://github.com/farism/mint-fullscreen
- Owner: farism
- License: mit
- Created: 2023-09-11T11:05:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-17T20:36:48.000Z (over 2 years ago)
- Last Synced: 2025-05-21T10:49:17.895Z (10 months ago)
- Topics: fullscreen-api, mint, mint-lang
- Language: Mint
- Homepage: https://farism.github.io/mint-fullscreen/
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mint Fullscreen
[](https://github.com/farism/mint-battery/actions/workflows/ci.yml)
[Mint](https://mint-lang.com/) wrapper for the browser [Fullscreen API](https://developer.mozilla.org/docs/Web/API/Fullscreen_API)
# `Example`
Example of using the `Fullscreen` module
```mint
component Main {
fun enter {
case target {
Maybe::Just(el) =>
{
Fullscreen.enter(el)
void
}
=> void
}
}
fun exit {
Fullscreen.exit()
}
fun render {
"enter fullscreen"
"exit fullscreen"
}
}
```
# `Functions`
The `Fullscreen` module
- `enter(el : Dom.Element)` - Requests to enter fullscreen mode
- `exit()` - Requests to leave fullscreen mode
- `element() : Maybe(Dom.Element)` - Returns the active fullscreen element
- `isAvailable() : Bool` - Is the Fullscreen API available to use in the browser
- `isActive() : Bool` - Is fullscreen mode currently activated on an element