Rx.DOM.fromWebWorker(url)

# [Ⓣ][1]

Creates a Web Worker with a given URL as a Subject.

Syntax

Rx.DOM.fromWebWorker(url);

Arguments

  1. url (String): The URL of the Web Worker.

Returns

(Subject): A Subject which wraps a Web Worker.

Example

var worker = Rx.DOM.fromWebWorker('worker.js');

worker.subscribe(function (e) {
    console.log(e.data);
});

worker.onNext('some data');