[IPython-dev] Sourcing a javascript file from a notebook, and writing local javascript

Clare Sloggett claresloggett at gmail.com
Sat May 31 05:05:52 EDT 2014

Hi all,

I was playing around with embeddable javascript libraries and seeing if I
could make use them from a Notebook. My first attempt was to try the
simplest thing possible; embed it in a markdown cell. The javascript I was
trying to embed wants to both source an external file, and then use it via
some local javascript code, like
   <script language="javascript" src="http://some-url/library.js"></script>
   <script language="javascript">
   ... code ...

In Notebook 1.x, the local code executes but throws an error about
undefined variables, suggesting that the external javascript file was not
loaded. Is this expected?

In Notebook 2.0, so far as I can tell, none of it executes at all.

Am I right in thinking that embedding Javascript into a markdown cell has
been deprecated? Do I need to put it into custom.js instead? And, will I be
able to source the remote file from there, or will I need to make that
library local as well?

Sorry if this is a naive question, a lot of aspects of this are new to me.
I'm just looking for the most straightforward and lightweight approach so I
can experiment with my code.

Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140531/7d5564fe/attachment.html>

More information about the IPython-dev mailing list