All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.intendia.rxgwt2.elemento.RxElemento Maven / Gradle / Ivy

There is a newer version: 2.3
Show newest version
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 fn) {
        return RxElemental2.fromEvent(src, type.getName(), false).map(Js::cast).map(fn);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy