front-0.0.0.1: A reactive frontend web framework

Safe HaskellNone
LanguageHaskell2010

Text.Blaze.Front.Event

Contents

Synopsis

Event handling

mapActions :: (act -> act') -> Markup act -> Markup act' Source #

Modify all event handlers attached to a Markup tree so that the given function is applied to the return values of their callbacks.

Keyboard events

onKeyDown :: act -> Attribute act Source #

The user has pressed a physical key while the target element was focused.

onKeyUp :: act -> Attribute act Source #

The user has released a phyiscal key while the target element was focused.

onKeyPress :: act -> Attribute act Source #

The user has input some ASCII character while the target element was

Focus events

onFocus :: act -> Attribute act Source #

The focus has moved to the target element.

onBlur :: act -> Attribute act Source #

The focus has left the target element.

Form events

onValueChange :: act -> Attribute act Source #

The value property of the target element has changed. The new value is passed as a parameter to the callback. This handler is supported for input, textarea, and select elements.

onCheckedChange :: act -> Attribute act Source #

The checked property of the target element has changed. This handler is supported for input elements of type checkbox or radio.

onSelectedChange :: act -> Attribute act Source #

The selected property of the the target element has changed. This handler is supported for option elements.

onSubmit :: act -> Attribute act Source #

The user has submitted the target form. This handler is supported for form elements.

Mouse events

onClick :: act -> Attribute act Source #

A simplified version of onClick which watches for the LeftButton only and ignores the cursor position.

onDoubleClick :: act -> Attribute act Source #

A simplified version of onDoubleClick which watches for the LeftButton only and ignores the cursor position.

onMouseDown :: act -> Attribute act Source #

A simplified version of onMouseDown which watches for the LeftButton only and ignores the cursor position.

onMouseUp :: act -> Attribute act Source #

A simplified version of onMouseUp which watches for the LeftButton only and ignores the cursor position.

onMouseMove :: act -> Attribute act Source #

The mouse cursor has moved while positioned over the target element. The mouse position at the time the event was fired is passed as a parameter to the callback.

onMouseEnter :: act -> Attribute act Source #

The mouse cursor has entered the region occupied by the target element. The mouse position at the time the event was fired is passed as a parameter to the callback.

onMouseLeave :: act -> Attribute act Source #

The mouse cursor has left the region occupied by the target element. The mouse position at the time the event was fired is passed as a parameter to the callback.

onMouseOver :: act -> Attribute act Source #

Like MouseEnter, but handles bubbling differently.

onMouseOut :: act -> Attribute act Source #

Like MouseLeave, but handles bubbling differently.

UI Events

onScroll :: act -> Attribute act Source #

The the scroll-position of the page has changed. The amount by which it has changed (in lines) is passed as a parameter to the callback.

Wheel Events

onWheel :: act -> Attribute act Source #

The user has moved the scroll-wheel. The amount by which the scroll position of an infinitely large page is affected is passed as a parameter to the callback.