Skip to content

farism/mint-fullscreen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mint Fullscreen

CI

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 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

About

Mint lang wrapper for the browser Fullscreen API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages