How to create a JavaScript "Try It Yourself" Editor
<p>I know there are a number of "Try It Yourself" JavaScript editors, such as <a href="http://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic">W3School's Try It editor</a>, <a href="http://jsbin.com">JSBin</a>, and <a href="http://jsfiddle.net">JSFiddle</a>.</p>

<p>I'm developing a graphical JavaScript library that I'd like to let people try out from my own site (one difference from other editors is that my output would be to a canvas, not an HTML frame). Not wanting to reinvent the wheel, are there established ways for creating a "Try It Yourself" capability that consider issues like DOM-based scripting vulnerabilities?</p>
