brianleroux / xui

A tiny javascript framework for mobile web apps.
http://github.com/xui/xui
391 stars 159 forks source link

eventing: no unbind in core #14

Closed brianleroux closed 14 years ago

brianleroux commented 14 years ago
remy commented 14 years ago

Should the event model from "more" come in to base to enable the unbinding and give us a complete event model at the same time?

Or do we add a simple method as so:

xui.fn.un = function (type, fn) {
  return this.each(function () {
    this.removeEventListener(type, fn, false);
  });
};
brianleroux commented 14 years ago

I'm thinking un belongs in core... its an important feature. moving in closing. more should probably have more helpers for things like: swipe, pinch, etc