Module

Signal.DOM

#animationFrame

animationFrame :: Effect (Signal Time)

A signal which yields the current time, as determined by now, on every animation frame (see [https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame]).

#keyPressed

keyPressed :: Int -> Effect (Signal Boolean)

Creates a signal which will be true when the key matching the given key code is pressed, and false when it's released.

#mouseButton

mouseButton :: Int -> Effect (Signal Boolean)

Creates a signal which will be true when the given mouse button is pressed, and false when it's released.

#mouseButtonPressed

mouseButtonPressed :: MouseButton -> Effect (Signal Boolean)

Creates a signal which will be true when the given mouse button is pressed, and false when it's released. note: in IE8 and earlier you need to use MouseIE8MiddleButton if you want to query the middle button

#touch

touch :: Effect (Signal (Array Touch))

A signal containing the current state of the touch device, as described by the Touch record type.

#tap

tap :: Effect (Signal Boolean)

A signal which will be true when at least one finger is touching the touch device, and false otherwise.

#mousePos

mousePos :: Effect (Signal CoordinatePair)

A signal containing the current mouse position.

#windowDimensions

windowDimensions :: Effect (Signal DimensionPair)

A signal which contains the document window's current width and height.

#CoordinatePair

type CoordinatePair = { x :: Int, y :: Int }

#DimensionPair

type DimensionPair = { h :: Int, w :: Int }

#Touch

type Touch = { clientX :: Int, clientY :: Int, force :: Number, id :: String, pageX :: Int, pageY :: Int, radiusX :: Int, radiusY :: Int, rotationAngle :: Number, screenX :: Int, screenY :: Int }

Modules