Wiki script embedding tests: Mandelbrot generator

I’ve been doing some experiments with finding ways to bring more interactive features into Wikipedia and other wikis. Articles can be spruced up nicely in many ways — interactive maps that let you zoom or change time, graphs that allow you to change the parameters, diagrams showing moving parts…

So an extension to sandbox and run custom JavaScript widgets should be a useful direction to go in… my first test is a Mandelbrot set generator:

The extension separates the JavaScript contexts by using an iframe and a small sandbox page hosted on a separate domain, leaving the details of security to the browser’s existing same-origin systems. This gives nearly full power to the script — you could even use 3d WebGL rendering in supported browsers! — without giving it any direct access to users’ sessions on the wiki.

Will try to set up a publicly-usable sandbox page on Wikimedia Labs next week and play with it some more; maybe a gadget to do live-wiki testing with an opt-in. :)