Skip to content

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

Notifications You must be signed in to change notification settings

wolfflow/bacon.fromonevent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
})

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages