WorkerCommand
Extends:
Web worker command class.
Example:
API:
->do():Promise - do display.
->undo():Promise - undo display and display history previous content.
->start()
->stop()
Constructor Summary
Public Constructor | ||
public |
constructor(arg_runtime: object, arg_settings: object, arg_log_context: string): nothing Creates a web worker command instance. |
Member Summary
Public Members | ||
public |
Class type flag. |
Private Members | ||
private |
|
|
private |
_script_url: * |
|
private |
_worker: * |
|
private |
|
Method Summary
Public Methods | ||
public |
Check if command settings is valid. |
|
public |
stop() Stop worker. |
Private Methods | ||
private |
Do command. |
|
private |
Undo command. |
Inherited Summary
From class NameTypeSettingsLoggable | ||
public |
|
|
private |
_runtime: * |
|
private |
_settings: * |
|
private |
_ui: * |
|
public |
Get instance name. |
|
public |
get_router(): Router Get router. |
|
public |
Get runtime. |
|
public |
Get instance settings. |
|
public |
get_state_store(): Store Get runtime state store. |
|
public |
Get instance type. |
|
public |
Get UI. |
|
public |
Check if instance settings is valid. |
From class Command | ||
public |
|
|
public |
Do command. |
|
public |
Undo command. |
|
private |
Do command. |
|
private |
Undo command. |
Public Constructors
public constructor(arg_runtime: object, arg_settings: object, arg_log_context: string): nothing source
Creates a web worker command instance.
Command configuration is a simple object with:
- url: local script url
Override:
Command#constructorReturn:
nothing |
Public Members
Private Members
private _script_operands: * source
private _script_url: * source
private _worker: * source
private _worker_promise: * source
Public Methods
public is_valid(): boolean source
Check if command settings is valid.