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

js.util.Proxy Maven / Gradle / Ivy

package js.util;

import js.lang.Any;
import org.teavm.jso.JSBody;
import org.teavm.jso.JSProperty;


public abstract class Proxy implements Any {
    @JSBody(params = {"target", "handler"}, script = "return new Proxy(target, handler)")
    public static native  T create(T target, ProxyHandler handler);

    @JSBody(params = {"target", "handler"}, script = "return new Proxy(target, handler)")
    public static native  Revocable revocable(T target, ProxyHandler handler);

    public interface Revocable extends Any {
        @JSProperty
        T getProxy();

        void revoke();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy