Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fijiwebdesign authored Feb 12, 2017
1 parent 9247c42 commit f452637
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ https://github.com/socketio/socket.io-client

**Quick Install**

`npm i --save
`<script src="dist/socket.io-worker.bundle.js"></script>`
`npm i --save socketio-shared-webworker`

**Reason**

Expand Down Expand Up @@ -73,7 +72,7 @@ ws.setWorker('node_modules/socketio-shared-webworker/shared-worker.js')
```

Use in HTML `wio` is global.
Or to use in HTML `wio` is global.

```
<script src="dist/socket.io-worker.bundle.js"></script>
Expand All @@ -85,6 +84,8 @@ ws.setWorker('node_modules/socketio-shared-webworker/shared-worker.js')
```

Note: `ws.setWorker('node_modules/socketio-shared-webworker/shared-worker.js')` should point to the shared-worker.js url relative to your HTML page base URL. Shared webworkers can only be loaded from the same domain like CORS.

See `index.html` for an example.

To develop:
Expand Down

0 comments on commit f452637

Please sign in to comment.