| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Shpadoinkle.Html.Event
Description
This module provides a DSL of Events found on HTML elements.
This DSL is entirely optional. You may use the Props PListener constructor
provided by Shpadoinkle core and completely ignore this module.
You can use the listener, listen, listenRaw, listen' convenience
functions as well, without using this module. But for those who like a typed
DSL with named function, and overloading, this is for you.
All listners come in 2 flavors. Unctuous flavors. Plain (IE onInput), and prime (IE onInput').
The following should hold
onX (pure x) = onX' x
A flavor providing access to the RawNode and the RawEvent are not provided
here. If you want access to these try the listenRaw constructor. The intent
of this DSL is to provide a simple named functions.
Right now this module features limited specialization. But ideally we specialize
all of these listeners. For example the onInput listener takes a function
(Text -> m a) where Text is the current value of the input, and onKeyup takes
a function of type (KeyCode -> m a) from Keyboard. Mouse move
listeners for example, should take a function of ((Float, Float) -> m a) but
this work is not yet done. See https://gitlab.com/fresheyeball/Shpadoinkle/issues/5
Documentation
onTouchstart :: Applicative m => a -> (Text, Prop m a) Source #
onTouchstart' :: m a -> (Text, Prop m a) Source #
onTouchmove :: Applicative m => a -> (Text, Prop m a) Source #
onTouchmove' :: m a -> (Text, Prop m a) Source #
onTouchend :: Applicative m => a -> (Text, Prop m a) Source #
onTouchend' :: m a -> (Text, Prop m a) Source #
onTouchcancel :: Applicative m => a -> (Text, Prop m a) Source #
onTouchcancel' :: m a -> (Text, Prop m a) Source #
onStorage' :: m a -> (Text, Prop m a) Source #
onPopstate :: Applicative m => a -> (Text, Prop m a) Source #
onPopstate' :: m a -> (Text, Prop m a) Source #
onOffline' :: m a -> (Text, Prop m a) Source #
onMousewheel :: Applicative m => a -> (Text, Prop m a) Source #
onMousewheel' :: m a -> (Text, Prop m a) Source #
onMessage' :: m a -> (Text, Prop m a) Source #
onAnimationstart :: Applicative m => a -> (Text, Prop m a) Source #
onAnimationstart' :: m a -> (Text, Prop m a) Source #
onAnimationiteration :: Applicative m => a -> (Text, Prop m a) Source #
onAnimationiteration' :: m a -> (Text, Prop m a) Source #
onAnimationend :: Applicative m => a -> (Text, Prop m a) Source #
onAnimationend' :: m a -> (Text, Prop m a) Source #
onWaiting' :: m a -> (Text, Prop m a) Source #
onVolumechange :: Applicative m => a -> (Text, Prop m a) Source #
onVolumechange' :: m a -> (Text, Prop m a) Source #
onTimeupdate :: Applicative m => a -> (Text, Prop m a) Source #
onTimeupdate' :: m a -> (Text, Prop m a) Source #
onSuspend' :: m a -> (Text, Prop m a) Source #
onStalled' :: m a -> (Text, Prop m a) Source #
onSeeking' :: m a -> (Text, Prop m a) Source #
onRatechange :: Applicative m => a -> (Text, Prop m a) Source #
onRatechange' :: m a -> (Text, Prop m a) Source #
onProgress :: Applicative m => a -> (Text, Prop m a) Source #
onProgress' :: m a -> (Text, Prop m a) Source #
onPlaying' :: m a -> (Text, Prop m a) Source #
onLoadstart :: Applicative m => a -> (Text, Prop m a) Source #
onLoadstart' :: m a -> (Text, Prop m a) Source #
onLoadedmetadata :: Applicative m => a -> (Text, Prop m a) Source #
onLoadedmetadata' :: m a -> (Text, Prop m a) Source #
onLoadeddata :: Applicative m => a -> (Text, Prop m a) Source #
onLoadeddata' :: m a -> (Text, Prop m a) Source #
onEmptied' :: m a -> (Text, Prop m a) Source #
onDurationchange :: Applicative m => a -> (Text, Prop m a) Source #
onDurationchange' :: m a -> (Text, Prop m a) Source #
onCanplaythrough :: Applicative m => a -> (Text, Prop m a) Source #
onCanplaythrough' :: m a -> (Text, Prop m a) Source #
onCanplay' :: m a -> (Text, Prop m a) Source #
onBeforeprint :: Applicative m => a -> (Text, Prop m a) Source #
onBeforeprint' :: m a -> (Text, Prop m a) Source #
onAfterprint :: Applicative m => a -> (Text, Prop m a) Source #
onAfterprint' :: m a -> (Text, Prop m a) Source #
onDragstart :: Applicative m => a -> (Text, Prop m a) Source #
onDragstart' :: m a -> (Text, Prop m a) Source #
onDragover :: Applicative m => a -> (Text, Prop m a) Source #
onDragover' :: m a -> (Text, Prop m a) Source #
onDragleave :: Applicative m => a -> (Text, Prop m a) Source #
onDragleave' :: m a -> (Text, Prop m a) Source #
onDragenter :: Applicative m => a -> (Text, Prop m a) Source #
onDragenter' :: m a -> (Text, Prop m a) Source #
onDragend' :: m a -> (Text, Prop m a) Source #
onInvalid' :: m a -> (Text, Prop m a) Source #
onFocusout :: Applicative m => a -> (Text, Prop m a) Source #
onFocusout' :: m a -> (Text, Prop m a) Source #
onFocusin' :: m a -> (Text, Prop m a) Source #
onPagehide :: Applicative m => a -> (Text, Prop m a) Source #
onPagehide' :: m a -> (Text, Prop m a) Source #
onPageshow :: Applicative m => a -> (Text, Prop m a) Source #
onPageshow' :: m a -> (Text, Prop m a) Source #
onHashchange :: Applicative m => a -> (Text, Prop m a) Source #
onHashchange' :: m a -> (Text, Prop m a) Source #
onBeforeunload :: Applicative m => a -> (Text, Prop m a) Source #
onBeforeunload' :: m a -> (Text, Prop m a) Source #
onMouseup' :: m a -> (Text, Prop m a) Source #
onMouseout :: Applicative m => a -> (Text, Prop m a) Source #
onMouseout' :: m a -> (Text, Prop m a) Source #
onMouseover :: Applicative m => a -> (Text, Prop m a) Source #
onMouseover' :: m a -> (Text, Prop m a) Source #
onMousemove :: Applicative m => a -> (Text, Prop m a) Source #
onMousemove' :: m a -> (Text, Prop m a) Source #
onMouseleave :: Applicative m => a -> (Text, Prop m a) Source #
onMouseleave' :: m a -> (Text, Prop m a) Source #
onMousedown :: Applicative m => a -> (Text, Prop m a) Source #
onMousedown' :: m a -> (Text, Prop m a) Source #
onDblclick :: Applicative m => a -> (Text, Prop m a) Source #
onDblclick' :: m a -> (Text, Prop m a) Source #
onContextmenu :: Applicative m => a -> (Text, Prop m a) Source #
onContextmenu' :: m a -> (Text, Prop m a) Source #