-----------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards   #-}
-----------------------------------------------------------------------------
-- |
-- Module      :  Miso.Html.Event
-- Copyright   :  (C) 2016-2025 David M. Johnson
-- License     :  BSD3-style (see the file LICENSE)
-- Maintainer  :  David M. Johnson <code@dmj.io>
-- Stability   :  experimental
-- Portability :  non-portable
--
----------------------------------------------------------------------------
module Miso.Html.Event
  ( -- *** Mouse
    onClick
  , onClickWith
  , onDoubleClick
  , onMouseDown
  , onMouseUp
  , onMouseEnter
  , onMouseLeave
  , onMouseOver
  , onMouseOut
  -- *** Keyboard
  , onKeyDown
  , onKeyDownWithInfo
  , onKeyPress
  , onKeyUp
  -- *** Form
  , onInput
  , onChange
  , onChangeWith
  , onChecked
  , onSubmit
  -- *** Focus
  , onBlur
  , onFocus
  -- *** Drag
  , onDrag
  , onDragLeave
  , onDragEnter
  , onDragEnd
  , onDragStart
  , onDragOver
  -- *** Drop
  , onDrop
  -- *** Select
  , onSelect
  -- *** Pointer
  , onPointerDown
  , onPointerUp
  , onPointerEnter
  , onPointerLeave
  , onPointerOver
  , onPointerOut
  , onPointerCancel
  , onPointerMove
  -- *** Media
  , onAbort
  , onAbortWith
  , onCanPlay
  , onCanPlayWith
  , onCanPlayThrough
  , onCanPlayThroughWith
  , onDurationChange
  , onDurationChangeWith
  , onEmptied
  , onEmptiedWith
  , onEnded
  , onEndedWith
  , onError
  , onErrorWith
  , onLoadedData
  , onLoadedDataWith
  , onLoadedMetadata
  , onLoadedMetadataWith
  , onLoadStart
  , onLoadStartWith
  , onPause
  , onPauseWith
  , onPlay
  , onPlayWith
  , onPlaying
  , onPlayingWith
  , onProgress
  , onProgressWith
  , onRateChange
  , onRateChangeWith
  , onSeeked
  , onSeekedWith
  , onSeeking
  , onSeekingWith
  , onStalled
  , onStalledWith
  , onSuspend
  , onSuspendWith
  , onTimeUpdate
  , onTimeUpdateWith
  , onVolumeChange
  , onVolumeChangeWith
  , onWaiting
  , onWaitingWith
  ) where
-----------------------------------------------------------------------------
import           Miso.Event
import           Miso.Media (Media(..))
import           Miso.Types (Attribute)
import           Miso.String (MisoString)
-----------------------------------------------------------------------------
import           Language.Javascript.JSaddle (JSVal)
-----------------------------------------------------------------------------
-- | blur event defined with custom options
--
-- <https://developer.mozilla.org/en-US/docs/Web/Events/blur>
--
onBlur :: action -> Attribute action
onBlur :: forall action. action -> Attribute action
onBlur action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"blur" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/change
onChecked :: (Checked -> action) -> Attribute action
onChecked :: forall action. (Checked -> action) -> Attribute action
onChecked Checked -> action
f = MisoString
-> Decoder Checked
-> (Checked -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"change" Decoder Checked
checkedDecoder (\Checked
action JSVal
_ -> Checked -> action
f Checked
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/click
onClick :: action -> Attribute action
onClick :: forall action. action -> Attribute action
onClick action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"click" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/click
-- Like 'onClick', but passes the DOM reference along (akin to 'getElementBydId').
onClickWith :: (JSVal -> action) -> Attribute action
onClickWith :: forall action. (JSVal -> action) -> Attribute action
onClickWith JSVal -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"click" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
domRef -> JSVal -> action
action JSVal
domRef
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/focus
onFocus :: action -> Attribute action
onFocus :: forall action. action -> Attribute action
onFocus action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"focus" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/dblclick
onDoubleClick :: action -> Attribute action
onDoubleClick :: forall action. action -> Attribute action
onDoubleClick action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"dblclick" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/input
onInput :: (MisoString -> action) -> Attribute action
onInput :: forall action. (MisoString -> action) -> Attribute action
onInput MisoString -> action
f = MisoString
-> Decoder MisoString
-> (MisoString -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"input" Decoder MisoString
valueDecoder (\MisoString
action JSVal
_ -> MisoString -> action
f MisoString
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/change
onChange :: (MisoString -> action) -> Attribute action
onChange :: forall action. (MisoString -> action) -> Attribute action
onChange MisoString -> action
f = MisoString
-> Decoder MisoString
-> (MisoString -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"change" Decoder MisoString
valueDecoder (\MisoString
action JSVal
_ -> MisoString -> action
f MisoString
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/change
onChangeWith :: (MisoString -> JSVal -> action) -> Attribute action
onChangeWith :: forall action. (MisoString -> JSVal -> action) -> Attribute action
onChangeWith = MisoString
-> Decoder MisoString
-> (MisoString -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"change" Decoder MisoString
valueDecoder
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/select
onSelect :: (MisoString -> action) -> Attribute action
onSelect :: forall action. (MisoString -> action) -> Attribute action
onSelect MisoString -> action
f = MisoString
-> Decoder MisoString
-> (MisoString -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"select" Decoder MisoString
valueDecoder (\MisoString
action JSVal
_ -> MisoString -> action
f MisoString
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/keydown
onKeyDownWithInfo :: (KeyInfo -> action) -> Attribute action
onKeyDownWithInfo :: forall action. (KeyInfo -> action) -> Attribute action
onKeyDownWithInfo KeyInfo -> action
f = MisoString
-> Decoder KeyInfo
-> (KeyInfo -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"keydown" Decoder KeyInfo
keyInfoDecoder (\KeyInfo
action JSVal
_ -> KeyInfo -> action
f KeyInfo
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/keydown
onKeyDown :: (KeyCode -> action) -> Attribute action
onKeyDown :: forall action. (KeyCode -> action) -> Attribute action
onKeyDown KeyCode -> action
f = MisoString
-> Decoder KeyCode
-> (KeyCode -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"keydown" Decoder KeyCode
keycodeDecoder (\KeyCode
action JSVal
_ -> KeyCode -> action
f KeyCode
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/keypress
onKeyPress :: (KeyCode -> action) -> Attribute action
onKeyPress :: forall action. (KeyCode -> action) -> Attribute action
onKeyPress KeyCode -> action
f = MisoString
-> Decoder KeyCode
-> (KeyCode -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"keypress" Decoder KeyCode
keycodeDecoder (\KeyCode
action JSVal
_ -> KeyCode -> action
f KeyCode
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/keyup
onKeyUp :: (KeyCode -> action) -> Attribute action
onKeyUp :: forall action. (KeyCode -> action) -> Attribute action
onKeyUp KeyCode -> action
f = MisoString
-> Decoder KeyCode
-> (KeyCode -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"keyup" Decoder KeyCode
keycodeDecoder (\KeyCode
action JSVal
_ -> KeyCode -> action
f KeyCode
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/mouseup
onMouseUp :: action -> Attribute action
onMouseUp :: forall action. action -> Attribute action
onMouseUp action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"mouseup" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/mousedown
onMouseDown :: action -> Attribute action
onMouseDown :: forall action. action -> Attribute action
onMouseDown action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"mousedown" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/mouseenter
onMouseEnter :: action -> Attribute action
onMouseEnter :: forall action. action -> Attribute action
onMouseEnter action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"mouseenter" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/mouseleave
onMouseLeave :: action -> Attribute action
onMouseLeave :: forall action. action -> Attribute action
onMouseLeave action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"mouseleave" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/mouseover
onMouseOver :: action -> Attribute action
onMouseOver :: forall action. action -> Attribute action
onMouseOver action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"mouseover" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/mouseout
onMouseOut :: action -> Attribute action
onMouseOut :: forall action. action -> Attribute action
onMouseOut action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"mouseout" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/dragstart
onDragStart :: action -> Attribute action
onDragStart :: forall action. action -> Attribute action
onDragStart action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"dragstart" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/dragover
onDragOver :: action -> Attribute action
onDragOver :: forall action. action -> Attribute action
onDragOver action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"dragover" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/dragend
onDragEnd :: action -> Attribute action
onDragEnd :: forall action. action -> Attribute action
onDragEnd action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"dragend" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/dragenter
onDragEnter :: action -> Attribute action
onDragEnter :: forall action. action -> Attribute action
onDragEnter action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"dragenter" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/dragleave
onDragLeave :: action -> Attribute action
onDragLeave :: forall action. action -> Attribute action
onDragLeave action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"dragleave" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/drag
onDrag :: action -> Attribute action
onDrag :: forall action. action -> Attribute action
onDrag action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"drag" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/drop
onDrop :: AllowDrop -> action -> Attribute action
onDrop :: forall action. AllowDrop -> action -> Attribute action
onDrop (AllowDrop Bool
allowDrop) action
action =
  Options
-> MisoString
-> Decoder ()
-> (() -> JSVal -> action)
-> Attribute action
forall r action.
Options
-> MisoString
-> Decoder r
-> (r -> JSVal -> action)
-> Attribute action
onWithOptions Options
defaultOptions { preventDefault = allowDrop }
    MisoString
"drop" Decoder ()
emptyDecoder (\() JSVal
_ -> action
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/submit
onSubmit :: action -> Attribute action
onSubmit :: forall action. action -> Attribute action
onSubmit action
action =
  Options
-> MisoString
-> Decoder ()
-> (() -> JSVal -> action)
-> Attribute action
forall r action.
Options
-> MisoString
-> Decoder r
-> (r -> JSVal -> action)
-> Attribute action
onWithOptions Options
defaultOptions { preventDefault = True }
    MisoString
"submit" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/pointerup
onPointerUp :: (PointerEvent -> action) -> Attribute action
onPointerUp :: forall action. (PointerEvent -> action) -> Attribute action
onPointerUp PointerEvent -> action
f = MisoString
-> Decoder PointerEvent
-> (PointerEvent -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"pointerup" Decoder PointerEvent
pointerDecoder (\PointerEvent
action JSVal
_ -> PointerEvent -> action
f PointerEvent
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/pointerdown
onPointerDown :: (PointerEvent -> action) -> Attribute action
onPointerDown :: forall action. (PointerEvent -> action) -> Attribute action
onPointerDown PointerEvent -> action
f = MisoString
-> Decoder PointerEvent
-> (PointerEvent -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"pointerdown" Decoder PointerEvent
pointerDecoder (\PointerEvent
action JSVal
_ -> PointerEvent -> action
f PointerEvent
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/pointerenter
onPointerEnter :: (PointerEvent -> action) -> Attribute action
onPointerEnter :: forall action. (PointerEvent -> action) -> Attribute action
onPointerEnter PointerEvent -> action
f = MisoString
-> Decoder PointerEvent
-> (PointerEvent -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"pointerenter" Decoder PointerEvent
pointerDecoder (\PointerEvent
action JSVal
_ -> PointerEvent -> action
f PointerEvent
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/pointerleave
onPointerLeave :: (PointerEvent -> action) -> Attribute action
onPointerLeave :: forall action. (PointerEvent -> action) -> Attribute action
onPointerLeave PointerEvent -> action
f = MisoString
-> Decoder PointerEvent
-> (PointerEvent -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"pointerleave" Decoder PointerEvent
pointerDecoder (\PointerEvent
action JSVal
_ -> PointerEvent -> action
f PointerEvent
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/pointerover
onPointerOver :: (PointerEvent -> action) -> Attribute action
onPointerOver :: forall action. (PointerEvent -> action) -> Attribute action
onPointerOver PointerEvent -> action
f = MisoString
-> Decoder PointerEvent
-> (PointerEvent -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"pointerover" Decoder PointerEvent
pointerDecoder (\PointerEvent
action JSVal
_ -> PointerEvent -> action
f PointerEvent
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/pointerout
onPointerOut :: (PointerEvent -> action) -> Attribute action
onPointerOut :: forall action. (PointerEvent -> action) -> Attribute action
onPointerOut PointerEvent -> action
f = MisoString
-> Decoder PointerEvent
-> (PointerEvent -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"pointerout" Decoder PointerEvent
pointerDecoder (\PointerEvent
action JSVal
_ -> PointerEvent -> action
f PointerEvent
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/pointercancel
onPointerCancel :: (PointerEvent -> action) -> Attribute action
onPointerCancel :: forall action. (PointerEvent -> action) -> Attribute action
onPointerCancel PointerEvent -> action
f = MisoString
-> Decoder PointerEvent
-> (PointerEvent -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"pointercancel" Decoder PointerEvent
pointerDecoder (\PointerEvent
action JSVal
_ -> PointerEvent -> action
f PointerEvent
action)
-----------------------------------------------------------------------------
-- | https://developer.mozilla.org/en-US/docs/Web/Events/pointermove
onPointerMove :: (PointerEvent -> action) -> Attribute action
onPointerMove :: forall action. (PointerEvent -> action) -> Attribute action
onPointerMove PointerEvent -> action
f = MisoString
-> Decoder PointerEvent
-> (PointerEvent -> JSVal -> action)
-> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"pointermove" Decoder PointerEvent
pointerDecoder (\PointerEvent
action JSVal
_ -> PointerEvent -> action
f PointerEvent
action)
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_abort.asp
onAbort :: action -> Attribute action
onAbort :: forall action. action -> Attribute action
onAbort action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"abort" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_abort.asp
onAbortWith :: (Media -> action) -> Attribute action
onAbortWith :: forall action. (Media -> action) -> Attribute action
onAbortWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"abort" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_canplay.asp
onCanPlay :: action -> Attribute action
onCanPlay :: forall action. action -> Attribute action
onCanPlay action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"canplay" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_canplay.asp
onCanPlayWith :: (Media -> action) -> Attribute action
onCanPlayWith :: forall action. (Media -> action) -> Attribute action
onCanPlayWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"canplay" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_canplaythrough.asp
onCanPlayThrough :: action -> Attribute action
onCanPlayThrough :: forall action. action -> Attribute action
onCanPlayThrough action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"canplaythrough" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_canplaythrough.asp
onCanPlayThroughWith :: (Media -> action) -> Attribute action
onCanPlayThroughWith :: forall action. (Media -> action) -> Attribute action
onCanPlayThroughWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"canplaythrough" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_durationchange.asp
onDurationChange :: action -> Attribute action
onDurationChange :: forall action. action -> Attribute action
onDurationChange action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"durationchange" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_durationchange.asp
onDurationChangeWith :: (Media -> action) -> Attribute action
onDurationChangeWith :: forall action. (Media -> action) -> Attribute action
onDurationChangeWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"durationchange" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
onEmptied :: action -> Attribute action
onEmptied :: forall action. action -> Attribute action
onEmptied action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"emptied" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
onEmptiedWith :: (Media -> action) -> Attribute action
onEmptiedWith :: forall action. (Media -> action) -> Attribute action
onEmptiedWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"emptied" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_ended.asp
onEnded :: action -> Attribute action
onEnded :: forall action. action -> Attribute action
onEnded action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"ended" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_ended.asp
onEndedWith :: (Media -> action) -> Attribute action
onEndedWith :: forall action. (Media -> action) -> Attribute action
onEndedWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"ended" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_error.asp
onError :: action -> Attribute action
onError :: forall action. action -> Attribute action
onError action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"error" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_error.asp
onErrorWith :: (Media -> action) -> Attribute action
onErrorWith :: forall action. (Media -> action) -> Attribute action
onErrorWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"error" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_loadeddata.asp
onLoadedData :: action -> Attribute action
onLoadedData :: forall action. action -> Attribute action
onLoadedData action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"loadeddata" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_loadeddata.asp
onLoadedDataWith :: (Media -> action) -> Attribute action
onLoadedDataWith :: forall action. (Media -> action) -> Attribute action
onLoadedDataWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"loadeddata" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_loadedmetadata.asp
onLoadedMetadata :: action -> Attribute action
onLoadedMetadata :: forall action. action -> Attribute action
onLoadedMetadata action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"loadedmetadata" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_loadedmetadata.asp
onLoadedMetadataWith :: (Media -> action) -> Attribute action
onLoadedMetadataWith :: forall action. (Media -> action) -> Attribute action
onLoadedMetadataWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"loadedmetadata" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_loadstart.asp
onLoadStart :: action -> Attribute action
onLoadStart :: forall action. action -> Attribute action
onLoadStart action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"loadstart" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_loadstart.asp
onLoadStartWith :: (Media -> action) -> Attribute action
onLoadStartWith :: forall action. (Media -> action) -> Attribute action
onLoadStartWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"loadstart" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_pause.asp
onPause :: action -> Attribute action
onPause :: forall action. action -> Attribute action
onPause action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"pause" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_pause.asp
onPauseWith :: (Media -> action) -> Attribute action
onPauseWith :: forall action. (Media -> action) -> Attribute action
onPauseWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"pause" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_play.asp
onPlay :: action -> Attribute action
onPlay :: forall action. action -> Attribute action
onPlay action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"play" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_play.asp
onPlayWith :: (Media -> action) -> Attribute action
onPlayWith :: forall action. (Media -> action) -> Attribute action
onPlayWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"play" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_playing.asp
onPlaying :: action -> Attribute action
onPlaying :: forall action. action -> Attribute action
onPlaying action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"playing" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_playing.asp
onPlayingWith :: (Media -> action) -> Attribute action
onPlayingWith :: forall action. (Media -> action) -> Attribute action
onPlayingWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"playing" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_progress.asp
onProgress :: action -> Attribute action
onProgress :: forall action. action -> Attribute action
onProgress action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"progress" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_progress.asp
onProgressWith :: (Media -> action) -> Attribute action
onProgressWith :: forall action. (Media -> action) -> Attribute action
onProgressWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"progress" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_ratechange.asp
onRateChange :: action -> Attribute action
onRateChange :: forall action. action -> Attribute action
onRateChange action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"ratechange" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_ratechange.asp
onRateChangeWith :: (Media -> action) -> Attribute action
onRateChangeWith :: forall action. (Media -> action) -> Attribute action
onRateChangeWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"ratechange" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_seeked.asp
onSeeked :: action -> Attribute action
onSeeked :: forall action. action -> Attribute action
onSeeked action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"seeked" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_seeked.asp
onSeekedWith :: (Media -> action) -> Attribute action
onSeekedWith :: forall action. (Media -> action) -> Attribute action
onSeekedWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"seeked" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_seeking.asp
onSeeking :: action -> Attribute action
onSeeking :: forall action. action -> Attribute action
onSeeking action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"seeking" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_seeking.asp
onSeekingWith :: (Media -> action) -> Attribute action
onSeekingWith :: forall action. (Media -> action) -> Attribute action
onSeekingWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"seeking" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_stalled.asp
onStalled :: action -> Attribute action
onStalled :: forall action. action -> Attribute action
onStalled action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"stalled" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_stalled.asp
onStalledWith :: (Media -> action) -> Attribute action
onStalledWith :: forall action. (Media -> action) -> Attribute action
onStalledWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"stalled" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_suspend.asp
onSuspend :: action -> Attribute action
onSuspend :: forall action. action -> Attribute action
onSuspend action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"suspend" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_suspend.asp
onSuspendWith :: (Media -> action) -> Attribute action
onSuspendWith :: forall action. (Media -> action) -> Attribute action
onSuspendWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"suspend" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_timeupdate.asp
onTimeUpdate :: action -> Attribute action
onTimeUpdate :: forall action. action -> Attribute action
onTimeUpdate action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"timeupdate" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_timeupdate.asp
onTimeUpdateWith :: (Media -> action) -> Attribute action
onTimeUpdateWith :: forall action. (Media -> action) -> Attribute action
onTimeUpdateWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"timeupdate" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_volumechange.asp
onVolumeChange :: action -> Attribute action
onVolumeChange :: forall action. action -> Attribute action
onVolumeChange action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"volumechange" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_volumechange.asp
onVolumeChangeWith :: (Media -> action) -> Attribute action
onVolumeChangeWith :: forall action. (Media -> action) -> Attribute action
onVolumeChangeWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"volumechange" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_waiting.asp
onWaiting :: action -> Attribute action
onWaiting :: forall action. action -> Attribute action
onWaiting action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"waiting" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() JSVal
_ -> action
action
-----------------------------------------------------------------------------
-- | https://www.w3schools.com/tags/av_event_waiting.asp
onWaitingWith :: (Media -> action) -> Attribute action
onWaitingWith :: forall action. (Media -> action) -> Attribute action
onWaitingWith Media -> action
action = MisoString
-> Decoder () -> (() -> JSVal -> action) -> Attribute action
forall r action.
MisoString
-> Decoder r -> (r -> JSVal -> action) -> Attribute action
on MisoString
"waiting" Decoder ()
emptyDecoder ((() -> JSVal -> action) -> Attribute action)
-> (() -> JSVal -> action) -> Attribute action
forall a b. (a -> b) -> a -> b
$ \() -> Media -> action
action (Media -> action) -> (JSVal -> Media) -> JSVal -> action
forall b c a. (b -> c) -> (a -> b) -> a -> c
. JSVal -> Media
Media
-----------------------------------------------------------------------------