com.intendia.rxgwt2.elemento.RxElemento Maven / Gradle / Ivy
package com.intendia.rxgwt2.elemento;
import com.intendia.rxgwt2.elemental2.RxElemental2;
import elemental2.dom.Event;
import elemental2.dom.EventTarget;
import io.reactivex.Observable;
import io.reactivex.functions.Function;
import jsinterop.base.Js;
import org.jboss.gwt.elemento.core.EventType;
public interface RxElemento {
static Observable fromEvent(EventTarget src, EventType type) {
return RxElemental2.fromEvent(src, type.getName()).map(Js::cast);
}
static Observable fromEvent(EventTarget src, EventType type, boolean useCapture) {
return RxElemental2.fromEvent(src, type.getName(), useCapture).map(Js::cast);
}
static Observable fromEvent(EventTarget src, EventType type, Function super T, V> fn) {
return RxElemental2.fromEvent(src, type.getName(), false).map(Js::cast).map(fn);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy