bacon.fromonevent

Deal with old onEventName (onclick, onkeydown, etc..) event handling model in FRP style


Keywords
event, frp, bacon.js, reactive
Install
bower install bacon.fromonevent

Documentation

bacon.fromonevent

Legacy event binding plugin for Bacon.js.

Quite useless at desktop/mobile, but certainly useful in a huge variety of embedded browsers (e.g. Set-Top Boxes and SmartTVs), which component APIs use 'on-eventname' style for their callbacks.

Build Status

Example Code

btn = document.getElementById("btn")
Bacon.fromOnEvent(btn, "onclick").onValue(function(){
  //callback here
})