Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var d=(0,eval)('document');
- var p=(0,eval)('JSON.stringify');
- //rect(20,20,20,20);
- //science on `document`
- /**
- * the document that you get from eval is a separate document from the main document object, so it's not breaking the rules to use it
- * if you use document.write, it overwrites any PJS content on the canvas
- */
- d.write(
- '<style>'+
- 'body{background-color:#1375;color:#999999;font-family:inconsolata,consolas,monaco,courier,monospace}'+
- '</style>'
- );
- frameCount=0;
- draw= function() {
- if(frameCount<5){
- d.write(
- '<script>rect(20,20,20,20)</script>'+
- '<p>Hi there!</p>' +
- '<button onclick="alert(0x539)">click this button!</button>'
- );
- var a=get(0,0,400,400);
- d.write(p(d,null,2));
- d.write(a); //so basically PJS functions still work...
- image(a,20,20); //but their effects aren't directly visible.
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement