private void liveBitlessEvent( String eventName, String nameSpace, String cssSelector, Object data, Function... funcs) { LiveBindFunction liveBindFunction = liveBindFunctionByEventName.get(eventName); if (liveBindFunction == null) { liveBindFunction = new LiveBindFunction(eventName, "live", data); sink(BITLESS, eventName); elementEvents.add(liveBindFunction); liveBindFunctionByEventName.put(eventName, liveBindFunction); } for (Function f : funcs) { liveBindFunction.addBindFunctionForSelector( cssSelector, new BindFunction(BITLESS, eventName, nameSpace, f, data, -1)); } }
private void liveBitEvent( int eventbits, String nameSpace, String cssSelector, Object data, Function... funcs) { for (int i = 0; i < 28; i++) { int event = (int) Math.pow(2, i); if ((eventbits & event) == event) { // is a LiveBindFunction already attached for this kind of event LiveBindFunction liveBindFunction = liveBindFunctionByEventType.get(event); if (liveBindFunction == null) { liveBindFunction = new LiveBindFunction(event, "live", data); sink(eventbits, null); elementEvents.add(liveBindFunction); liveBindFunctionByEventType.put(event, liveBindFunction); } for (Function f : funcs) { liveBindFunction.addBindFunctionForSelector( cssSelector, new BindFunction(event, null, nameSpace, f, data, -1)); } } } }