Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
asvd committed Sep 5, 2014
1 parent a2e2c93 commit 0c77930
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Jailed — secured plugins with custom API
========================================
Jailed — sandboxed plugins, custom API
======================================

Jailed is a small JavaScript library for executing an untrusted code
as a plugin in a sandboxed environment. The key feature of Jailed is
Expand Down Expand Up @@ -27,14 +27,14 @@ With Jailed you can:
calculation times;

- Perform some heavy calculations in a separate thread
[DEMO](https://asvd.github.io/jailed/demos/circle/)
[[demo](https://asvd.github.io/jailed/demos/circle/)]

- Delegate to a 3rd-party code the precise set of methods to
harmlessly operate on the part of your application
[DEMO](https://asvd.github.io/jailed/demos/banner/)
[[demo](https://asvd.github.io/jailed/demos/banner/)]

- Safely execute user-submitted code
[DEMO](https://asvd.github.io/jailed/demos/console/)
[[demo](https://asvd.github.io/jailed/demos/console/)]

- Export the particular set of methods (in both directions) and call
them from the opposite site, without a need for messaging, thus
Expand All @@ -61,7 +61,7 @@ var plugin = new jailed.Plugin(path, api);
###### plugin.js

```js
// runs in the worker, cannot access the main application, with except
// runs in a worker, cannot access the main application, with except
// for the explicitly exported alert() method

// exported methods are stored in the application.remote object
Expand All @@ -84,7 +84,7 @@ previously stored upon the initial method call.

For the web-browser environment — download the
[distribution](https://github.com/asvd/jailed/releases/download/v0.1.0/jailed-0.1.0.tar.gz)
(14 kb), unpack it and load the `jailed.js` in a preferrable way. This
[14 kb], unpack it and load the `jailed.js` in a preferrable way. That
is an UMD module, so it may simply be loaded as a plain JavaScript
file using the `<script>` tag:

Expand All @@ -106,7 +106,7 @@ var jailed = require('jailed');

Optionally you may load the script from the
[distribution](https://github.com/asvd/jailed/releases/download/v0.1.0/jailed-0.1.0.tar.gz)
(14 kb):
[14 kb]:

```js
var jailed = require('path/to/jailed.js');
Expand Down Expand Up @@ -166,8 +166,8 @@ application.remote.alert('hello from the plugin');
```


Creating a plugin from a string with a source code is very similar, it
is performed using `jailed.DynamicPlugin` constructor:
Creating a plugin from a string with a source code is very similar,
this is performed using `jailed.DynamicPlugin` constructor:


###### application.js
Expand Down
4 changes: 2 additions & 2 deletions lib/jailed.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ if (typeof window == 'undefined') {
* A special kind of event:
* - which can only be emitted once;
* - executes a set of subscribed handlers upon emission;
* - if a handler is subscibed after the event was emitted, it
* will be issued immideately.
* - if a handler is subscribed after the event was emitted, it
* will be invoked immideately.
*
* Used for the events which only happen once (or do not happen at
* all) during a single plugin lifecycle - connect, disconnect and
Expand Down

0 comments on commit 0c77930

Please sign in to comment.