Skip to main content

WebWorker

Namespace: Wisej.Ext.WebWorker

Assembly: Wisej.Ext.WebWorker

The WebWorker component represents a JavaScript WebWorker instance that can run on the client and fire sever events and receive updates from the server.

public class WebWorker : Component, IWisejHandler

Constructors

Instance memberWebWorker()

Initializes a new instance of the WebWorker class.

Instance memberWebWorker(container)

Initializes a new instance of the WebWorker class together with the specified container.

NameTypeDescription
containerIContainerA IContainer that represents the container for the component.

Properties

Static memberIsSupported

Boolean: Returns true if the client browser supports the JavaScript Worker class.

Instance memberJavaScript

String: Returns or sets the JavaScript code to execute in the WebWorker process. (Default: "")

Instance memberJavaScriptSource

String: Returns or sets the JavaScript file with the source code to execute in the WebWorker process. (Default: "")

Methods

Instance memberSendMessage(data)

Sends the data object to the current WebWorker, if it's running.

ParameterTypeDescription
dataObject

Instance memberTerminate()

Terminates the current WebWorker.

Instance memberUpdate()

Updates the component on the client.

Events

Instance memberPostMessage

WebWorkerPostMessageEventHandler Fired when the WebWorker calls "postMessage".