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

elemental2.dom.ServiceWorkerContainer Maven / Gradle / Ivy

The newest version!
package elemental2.dom;
import elemental2.dom.ErrorEvent;
import elemental2.dom.URL;
import elemental2.dom.TrustedScriptURL;
import elemental2.dom.Event;
import elemental2.dom.RegistrationOptions;
import elemental2.dom.ServiceWorkerRegistration;
import elemental2.promise.Promise;
import elemental2.core.JsArray;
import elemental2.dom.EventTarget;
import jsinterop.annotations.JsProperty;
import jsinterop.base.Js;
import jsinterop.annotations.JsFunction;
import elemental2.dom.ExtendableMessageEvent;
import jsinterop.annotations.JsOverlay;
import elemental2.dom.ServiceWorker;
import java.lang.Object;
import java.lang.String;
import jsinterop.annotations.JsType;
import jsinterop.annotations.JsPackage;
@JsType(isNative = true,namespace = JsPackage.GLOBAL)
public interface ServiceWorkerContainer extends EventTarget{
@JsType(isNative = true,name = "?",namespace = JsPackage.GLOBAL)
public interface GetRegistrationDocumentURLUnionType{
@JsOverlay
static ServiceWorkerContainer.GetRegistrationDocumentURLUnionType of(Object o){
return Js.cast(o);
}
@JsOverlay
default String asString(){
return Js.asString(this);
}
@JsOverlay
default URL asURL(){
return Js.cast(this);
}
@JsOverlay
default boolean isString(){
return (Object)this instanceof String;
}
@JsOverlay
default boolean isURL(){
return (Object)this instanceof URL;
}
}
@JsFunction
public interface OncontrollerchangeFn{
void onInvoke(Event p0);
}
@JsFunction
public interface OnerrorFn{
void onInvoke(ErrorEvent p0);
}
@JsFunction
public interface OnmessageFn{
void onInvoke(ExtendableMessageEvent p0);
}
@JsType(isNative = true,name = "?",namespace = JsPackage.GLOBAL)
public interface RegisterScriptURLUnionType{
@JsOverlay
static ServiceWorkerContainer.RegisterScriptURLUnionType of(Object o){
return Js.cast(o);
}
@JsOverlay
default String asString(){
return Js.asString(this);
}
@JsOverlay
default TrustedScriptURL asTrustedScriptURL(){
return Js.cast(this);
}
@JsOverlay
default URL asURL(){
return Js.cast(this);
}
@JsOverlay
default boolean isString(){
return (Object)this instanceof String;
}
@JsOverlay
default boolean isTrustedScriptURL(){
return (Object)this instanceof TrustedScriptURL;
}
@JsOverlay
default boolean isURL(){
return (Object)this instanceof URL;
}
}
@JsProperty
ServiceWorker getController();
@JsProperty
ServiceWorkerContainer.OncontrollerchangeFn getOncontrollerchange();
@JsProperty
ServiceWorkerContainer.OnerrorFn getOnerror();
@JsProperty
ServiceWorkerContainer.OnmessageFn getOnmessage();
@JsProperty
Promise getReady();
Promise getRegistration();
Promise getRegistration(ServiceWorkerContainer.GetRegistrationDocumentURLUnionType documentURL);
@JsOverlay
default Promise getRegistration(String documentURL){
return getRegistration(Js.uncheckedCast(documentURL));
}
@JsOverlay
default Promise getRegistration(URL documentURL){
return getRegistration(Js.uncheckedCast(documentURL));
}
Promise> getRegistrations();
Promise register(ServiceWorkerContainer.RegisterScriptURLUnionType scriptURL,RegistrationOptions options);
Promise register(ServiceWorkerContainer.RegisterScriptURLUnionType scriptURL);
@JsOverlay
default Promise register(String scriptURL,RegistrationOptions options){
return register(Js.uncheckedCast(scriptURL),options);
}
@JsOverlay
default Promise register(String scriptURL){
return register(Js.uncheckedCast(scriptURL));
}
@JsOverlay
default Promise register(TrustedScriptURL scriptURL,RegistrationOptions options){
return register(Js.uncheckedCast(scriptURL),options);
}
@JsOverlay
default Promise register(TrustedScriptURL scriptURL){
return register(Js.uncheckedCast(scriptURL));
}
@JsOverlay
default Promise register(URL scriptURL,RegistrationOptions options){
return register(Js.uncheckedCast(scriptURL),options);
}
@JsOverlay
default Promise register(URL scriptURL){
return register(Js.uncheckedCast(scriptURL));
}
@JsProperty
void setController(ServiceWorker controller);
@JsProperty
void setOncontrollerchange(ServiceWorkerContainer.OncontrollerchangeFn oncontrollerchange);
@JsProperty
void setOnerror(ServiceWorkerContainer.OnerrorFn onerror);
@JsProperty
void setOnmessage(ServiceWorkerContainer.OnmessageFn onmessage);
@JsProperty
void setReady(Promise ready);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy