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();
}
}