threepenny-gui-0.8.2.4: GUI framework that uses the web browser as a display.

Safe HaskellNone
LanguageHaskell98

Graphics.UI.Threepenny.Events

Contents

Synopsis

Synopsis

Events on DOM elements.

Convenience events

valueChange :: Element -> Event String Source #

Event that occurs when the user changes the value of the input element.

selectionChange :: Element -> Event (Maybe Int) Source #

Event that occurs when the user changes the selection of a select element.

checkedChange :: Element -> Event Bool Source #

Event that occurs when the user changes the checked status of an input element of type checkbox.

Standard DOM events

click :: Element -> Event () Source #

Mouse click.

contextmenu :: Element -> Event (Int, Int) Source #

Context menu event.

mousemove :: Element -> Event (Int, Int) Source #

Event that periodically occurs while the mouse is moving over an element.

The event value represents the mouse coordinates relative to the upper left corner of the element.

Note: The body element responds to mouse move events, but only in the area occupied by actual content, not the whole browser window.

mousedown :: Element -> Event (Int, Int) Source #

Mouse down event. The mouse coordinates are relative to the element.

mouseup :: Element -> Event (Int, Int) Source #

Mouse up event. The mouse coordinates are relative to the element.

hover :: Element -> Event () Source #

Mouse enters an element.

leave :: Element -> Event () Source #

Mouse leaving an element.

focus :: Element -> Event () Source #

Element receives focus.

blur :: Element -> Event () Source #

Element loses focus.

keyup :: Element -> Event KeyCode Source #

Key released while element has focus.

keydown :: Element -> Event KeyCode Source #

Key pressed while element has focus. Returns the keycode (as opposed to the ASCII value) of any key, including SHIFT, CTRL and arrow keys.