Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 1.14 KB

README.md

File metadata and controls

55 lines (39 loc) · 1.14 KB

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