reactive-banana-threepenny-0.7.1.3: Examples for the reactive-banana library, using threepenny-gui.

Safe HaskellNone

Reactive.Banana.Threepenny

Contents

Synopsis

Synopsis

Utility functions for interfacing with Graphics.UI.Threepenny. Note: Useful, but I haven't done any serious design work on these.

General

event :: Frameworks t => (x -> Event a) -> x -> Moment t (Event t a)Source

Obtain an event for an element.

behavior :: Frameworks t => ReadWriteAttr x i o -> x -> Moment t (Behavior t o)Source

Behavior from an attribute. Uses fromPoll, so may behave as you expect.

sink :: Frameworks t => ReadWriteAttr x i o -> Behavior t i -> Moment t x -> Moment t ()Source

Animate an attribute with a behavior.

Specific widgets

eventValue :: Frameworks t => Element -> Moment t (Event t String)Source

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

behaviorValue :: Frameworks t => Element -> String -> Moment t (Behavior t String)Source

Behavior corresponding to user input in the element.

eventSelection :: Frameworks t => Element -> Moment t (Event t (Maybe Int))Source

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