With this profile, kernel.js is replaced by a simple object that executes javascript in the browser rather than remotely via websockets.
This is more of a toy / proof of concept than anything.
1
1
2
2
console.log("hi")
hi
double = function (x) {
return x * x;
}
console.log(double(5));
console.log(double(10));
25 100
foo = 5
5
console.log(location)
http://127.0.0.1:8890/05f99275-69db-42ff-92c2-59780eb7f1fc
foo + double(10)
105
bar
ReferenceError: bar is not defined at eval (eval at <anonymous> (http://127.0.0.1:8890/static/js/kernel.js:236:22), <anonymous>:1:1) at Kernel.execute (http://127.0.0.1:8890/static/js/kernel.js:236:17) at CodeCell.execute (http://127.0.0.1:8890/static/js/codecell.js:251:34) at Notebook.execute_selected_cell (http://127.0.0.1:8890/static/js/notebook.js:1366:18) at HTMLDocument.<anonymous> (http://127.0.0.1:8890/static/js/notebook.js:158:22) at HTMLDocument.f.event.dispatch (http://127.0.0.1:8890/static/jquery/js/jquery-1.7.1.min.js:3:4351) at HTMLDocument.h.handle.i (http://127.0.0.1:8890/static/jquery/js/jquery-1.7.1.min.js:3:328)