block by bollwyvl 10440652

IPython Notebook Javascript Editor Enhancements

Jupyter Notebook JS Authoring mode

Try it now!

%%javascript
require(
  ["https://cdn.rawgit.com/bollwyvl/10440652/raw/70b237937b40481a07a7766d5d5a2076bb0cbaab/nbjscmp.js"],
  function(nbjscmp){ nbjscmp.load_ipython_extension(); }
);

The Problem

You’ve built some great JS app in a Jupyter Notebook, but inadvertently add a single character, then try to run your cell, and see:

Javascript error adding output!
SyntaxError: Unexpected token ;
See your browser Javascript console for more details.

The Jupyter Notebook is a great place to try out novel JS applications. However, when working in JS in the Notebook, you have to accept that errors won’t be allowed to pass all the way out to you, making debugging very hard.

Install this extension, and you’ll see:

nbjscmp.js