public void unbind(String events, Function f) { for (EventName ev : EventName.split(events)) { SpecialEvent hook = special.get(ev.eventName); boolean unbind = hook == null || hook.tearDown(element) == false; if (unbind) { unbind(Event.getTypeInt(ev.eventName), ev.nameSpace, ev.eventName, f); } if (hook != null) { hook.remove(element, ev.eventName, ev.nameSpace, f); } } }
public void die(String events, String cssSelector) { for (EventName ev : EventName.split(events)) { SpecialEvent hook = special.get(ev.eventName); boolean unbind = hook == null || hook.tearDown(element) == false; if (unbind) { die(Event.getTypeInt(ev.eventName), ev.nameSpace, ev.eventName, cssSelector); } if (hook != null) { hook.remove(element, ev.eventName, ev.nameSpace, null); } } }
public void live(String events, String cssSelector, Object data, Function... funcs) { for (EventName ev : EventName.split(events)) { SpecialEvent hook = special.get(ev.eventName); boolean bind = hook == null || hook.setup(element) == false; for (Function function : funcs) { int b = Event.getTypeInt(ev.eventName); if (bind) { live(b, ev.nameSpace, ev.eventName, cssSelector, data, function); } if (hook != null) { hook.add(element, ev.eventName, ev.nameSpace, data, function); } } } }
public void bind(String events, final Object data, Function... funcs) { if (funcs.length == 0 || funcs[0] == null) { unbind(events, null); } for (EventName ev : EventName.split(events)) { SpecialEvent hook = special.get(ev.eventName); boolean bind = hook == null || hook.setup(element) == false; for (Function function : funcs) { int b = Event.getTypeInt(ev.eventName); if (bind) { bind(b, ev.nameSpace, ev.eventName, data, function, -1); } if (hook != null) { hook.add(element, ev.eventName, ev.nameSpace, data, function); } } } }