1.2.2 • Published 8 years ago

worker-render v1.2.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

worker-render

npm version

Run your applications in a WebWorker and have changes automatically update the DOM.

Install

npm install worker-render --save

Usage

To use worker-render you need a module that runs in the window and one that runs in a Web Worker. Getting your app to run in a Web Worker is up to you, but it is easy with StealJS.

window.js

var windowRender = require("worker-render/window");

var worker = new Worker(...);
windowRender.updateWith(worker);

worker.js

worker-render will work with any JavaScript framework. In this example todoApp is a function that returns a DocumentFragment. How you initialize your application is up to you, but you should do so in the ready callback.

var renderer = require("worker-render/worker");
var $ = require("jquery");
var todoApp = require("./todo-app");

renderer.ready(render);

function render(){
  $("#app").html(todoApp());
}

License

MIT

1.3.0-pre.0

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

9 years ago

1.1.8

9 years ago

1.1.7

9 years ago

1.1.6

9 years ago

1.1.5

9 years ago

1.1.4

9 years ago

1.1.3

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago