@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="SharedWorker")
public class SharedWorker
extends EventTarget
| Modifier and Type | Field and Description |
|---|---|
@JsNullable ErrorEventHandler |
onerror
The AbstractWorker.onerror property of the AbstractWorker interface represents an EventHandler, that is a function to be called when the error event occurs and bubbles through the Worker.
|
| Constructor and Description |
|---|
SharedWorker(java.lang.String scriptURL)
The SharedWorker() constructor creates a SharedWorker object that executes the script at the specified URL.
|
SharedWorker(java.lang.String scriptURL,
java.lang.String options)
The SharedWorker() constructor creates a SharedWorker object that executes the script at the specified URL.
|
SharedWorker(java.lang.String scriptURL,
WorkerOptions options)
The SharedWorker() constructor creates a SharedWorker object that executes the script at the specified URL.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addErrorListener(ErrorEventListener callback) |
void |
addErrorListener(ErrorEventListener callback,
AddEventListenerOptions options) |
void |
addErrorListener(ErrorEventListener callback,
boolean useCapture) |
MessagePort |
port()
The port property of the SharedWorker interface returns a MessagePort object used to communicate and control the shared worker.
|
void |
removeErrorListener(ErrorEventListener callback) |
void |
removeErrorListener(ErrorEventListener callback,
boolean useCapture) |
void |
removeErrorListener(ErrorEventListener callback,
EventListenerOptions options) |
addEventListener, addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener, removeEventListenerassign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toString_, valueOf_, valuespublic @JsNullable ErrorEventHandler onerror
public SharedWorker(@Nonnull
java.lang.String scriptURL,
@Nonnull
java.lang.String options)
public SharedWorker(@Nonnull
java.lang.String scriptURL,
@Nonnull
WorkerOptions options)
public SharedWorker(@Nonnull
java.lang.String scriptURL)
@JsProperty(name="port") @Nonnull public MessagePort port()
@JsOverlay
public final void addErrorListener(@Nonnull
ErrorEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addErrorListener(@Nonnull
ErrorEventListener callback,
boolean useCapture)
@JsOverlay
public final void addErrorListener(@Nonnull
ErrorEventListener callback)
@JsOverlay
public final void removeErrorListener(@Nonnull
ErrorEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeErrorListener(@Nonnull
ErrorEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeErrorListener(@Nonnull
ErrorEventListener callback)