JS9 in IPython notebooks

This shows how JS9 should work in IPython notebooks. Under development.


In [1]:
%%html
<div class="JS9Menubar"></div>
<div class="JS9" id="JS9"></div>
<style>
    @import("//js9.si.edu/js9/js9-allinone.css");
</style>



In [2]:
%%html
<script>
    requirejs({
        paths: {
            js9: "//js9.si.edu/js9/js9-allinone",
        },
        shim: {
            js9: {
                exports: "JS9"
            }
        }
    }, [
        "js9",
    ], function(JS9){
        // the timeout is needed because there are some assumptions about load order and timing
        setTimeout(function(){
            JS9.Load("http://js9.si.edu/js9/png/casa.png");
        }, 1000);
    })
</script>


Previous errors are gone, the socket.io error you can savely ignore if you are not using server side computing. I'm getting a new error now though, Uncaught TypeError: JS9.Load is not a function. Probably i'm not using requirejs properly, going to read about this now.