dom-behavior
Define javascript behavior for DOM elements.
Install
Example
Example Page Some content Edit I'm not a link but I act like one
var behave = var behaviors = { element{ // activate editor } } { // create a fake hyperlink var url = element elementstylecursor = 'pointer' element{ windowlocation = url } return { if message == 'update' url = element if url elementstylecursor = 'pointer' else elementstylecursor = 'default' } } { // multiple behaviors can be added to the same element // seperated by spaces. Just like html classes. } var notify = var linkDiv = documentlinkDiv // normally this would be called from some data-binding/templating thingy.// triggers func('change') on any behaviors directly on this node // triggers func('change') on any child of this node with behaviors // remove behaviors and trigger func('remove')
become, json-context and rincewind
Using withSee https://github.com/mmckegg/realtime-blog-example-with-browserify.