remy / bind.js

bind.js - simple two way data binding to HTML and callbacks
694 stars 62 forks source link

Support events fired at the root object #7

Open remy opened 9 years ago

remy commented 9 years ago

There's no mapping for the root object, so maybe this is a special key?

Something like:

var o = new Bind({
  cats: ['sam', 'nap', 'prince']
}, {
  ':root': callback
});

Akin to the [:root](http://www.w3.org/TR/css3-selectors/#root-pseudo) CSS selector.

Thoughts?
adelriosantiago commented 7 years ago

How could this be implemented? Any idea someone?