We have been sandboxing JavaScript in iframes for a long time. The Web Worker API has the nice property that it doesn have access to objects like document and the like, and just runs code that you can pass over to it.
With this, Elijah Grey has created an experimental jsandbox API that gives you an eval function that you pass in some code, and optionally input data, callback for results, and an onerror callback.
Code looks like this:
PLAIN TEXT
JAVASCRIPT:
1.
2.jsandbox
3..eval({
4.code : "x=1;Math.round(Math.pow(input, ++x))",
5.input : 36.565010597564445,
6.callback: function(n) {
7.console.log("number: ", n); // number: 1337
8.}
9.}).eval({
10.code : "][];.] (*# ($(! ~",
11.onerror: function(ex) {
12.console.log("syntax error: ", ex); // syntax error: [error object]
13.}
14.}).eval({
15.code : "foo"+input,
16.input : "bar",
17.callback: function(str) {
18.console.log("string: ", str); // string: foobar
19.}
20.}).eval({
21.code : "({q:1, w:2})",
22.callback: function(obj) {
23.console.log("object: ", obj); // object: object q=1 w=2
24.}
25.}).eval({
26.code : "[1, 2, 3].concat(input)",
27.input : [4, 5, 6],
28.callback: function(arr) {
29.console.log("array: ", arr); // array: [1, 2, 3, 4, 5, 6]
30.}
31.}).eval({
32.code : "function x(z){this.y=z;};new x(input)",
33.input : 4,
34.callback: function(x) {
35.console.log("new x: ", x); // new x: object y=4
36.}
37.});
38.
Related Stuff
-
MooV: Using cutting edge Video phones and Software Video Phones - coupling all that with VoIP and empowering the disabled.
-
Moo Telecom: VoIP communications made easy - Ring anyway with the fun and ease of using a normal phone
-
TagR:Mobile Social Network with Real Time Locations Based services, and Ambience Intelligence, VoiP, IM, Skype, Googletalk, Mapping, Flickr, Events, Calendaring, Scheduling, SecondLife Support
-
ClearSMS : ClearSMS is a Web-based application that lets you send bulk SMS messages to your customers, contacts, or just about anyone.
-
Jajah:jah is a VoIP (Voice over IP) provider, founded by Austrians Roman Scharf and Daniel Mattes in 2005[1]. The Jajah headquarters are located in Mountain View, CA, USA, and Luxembourg. Jajah maintains a development centre in Israel.
-
Skype: It’s free to download and free to call other people on Skype. Skype the number one voice over ip software
- PrivatePhone: a free local phone number with voicemail and messages you can check online or from any phone.

Original Source: