At Tue, 1 May 2012 14:03:42 -0500, Austin Seipp wrote: > > At one point when I was fiddling with stuff like this, my first hacky > solution was basically make a module with a single page that used > returnBlob to return a raw text string with a MIME type of > text/javascript - from a library point of view, my .urp file then > included a directive like 'script /Mathjax/js' where 'js' is the > aforementioned page handler, so it would get brought into every page. > This has the obvious downside that it 'takes over' the Mathjax module > namespace and also it hardcodes the path, which isn't great. It also > has the much worse downside that you basically have to escape your > javascript and insert it as a raw string literal into the module (I > tend to abuse things like this; sorry Adam!) > > Here's a fully working example of this idea: > https://github.com/thoughtpolice/ur-mathjax
Wow.. that is really clever, and a javascript library that I was interested in using to boot. I might look into doing something like that in the future. > I hope it helps. It is very helpful to see sophisticated usages of the JS FFI like this, especially for Ur/Web beginners like me. :) Thanks. Regards, Tim _______________________________________________ Ur mailing list [email protected] http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
