walmartlabs / thorax

Strengthening your Backbone
http://thoraxjs.org/
Other
1.32k stars 129 forks source link

Allow for document and window event binds #395

Open kpdecker opened 9 years ago

kpdecker commented 9 years ago

Should provide a way for views to register global event handlers while they are active so init and cleanup boilerplate are not needed in views.

One possible syntax:

events: {
  window: {
    'resize': function() {}
  },
  document: {
    keyup: function() {}
  }
}
loun4 commented 9 years ago

+1 !