News for hackers. Stuff that matters.
Re:<script type="text/coffeescript"> by jashkenas on Thursday February 25, 2010 @07:47AM (#1150542)
The gist of it is this. If you include the minified version of the CoffeeScript compiler on a webpage (43k, gzipped), it will compile and evaluate the inline coffeescripts on the page. That documentation site uses it to hook up the menu and the "Try CoffeeScript" demonstration in the toolbar.

If you view source, you'll see something along these lines:

    <script type="text/coffeescript">

      window.repl_run: ->
        try
          eval window.compiled_js
        catch error then alert error

      close_menus: ->
        current_nav.removeClass 'active' if current_nav
        current_nav: null

      $(document.body).click -> close_menus()

    </script>

There are no comments on this comment yet.