Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Corrected some issues in the readme and jazz'd it up a bit #25

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added syntax highlighting to the example code
Karl Herler committed Jun 20, 2011
commit d068d07f95171c1cba011210898244fe732baa6c
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ See the design document
### Example

#### Master source

```javascript
var sys = require('sys');
var Worker = require('webworker').Worker;

@@ -24,16 +24,18 @@ See the design document
};

w.postMessage({ foo : 'bar' });
```

#### Worker source

```javascript
onmessage = function(e) {
postMessage({ test : 'this is a test' });
};

onclose = function() {
sys.debug('Worker shuttting down.');
};
```

### API