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.
- C#
- VB.NET
public class WebWorker : Component, IWisejHandler
Public Class WebWorker
Inherits Component
Implements IWisejHandler
Constructors
WebWorker()
Initializes a new instance of the WebWorker class.
WebWorker(container)
Initializes a new instance of the WebWorker class together with the specified container.
| Name | Type | Description |
|---|---|---|
| container | IContainer | A IContainer that represents the container for the component. |
Properties
IsSupported
Boolean: Returns true if the client browser supports the JavaScript Worker class.
JavaScript
String: Returns or sets the JavaScript code to execute in the WebWorker process. (Default: "")
JavaScriptSource
String: Returns or sets the JavaScript file with the source code to execute in the WebWorker process. (Default: "")
Methods
SendMessage(data)
Sends the data object to the current WebWorker, if it's running.
| Parameter | Type | Description |
|---|---|---|
| data | Object |
Terminate()
Terminates the current WebWorker.
Update()
Updates the component on the client.
Events
PostMessage
WebWorkerPostMessageEventHandler Fired when the WebWorker calls "postMessage".