Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
bonsai.js bug reduction - running this script many times in a browser will behave differently
<!doctype html>
<html lang="en" class=" -webkit-">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0;">
<script src=""></script>
<div id="movie1"></div>
<div id="movie2"></div>
var movie ='movie1'), {
code: function() {
stage.on('message', function(data) {
new Rect(10, 10, 100, 100)
.stroke('#f00', 2)
width: 400,
height: 400,
var movie2 ='movie2'), {
code: function(){},
width: 400,
height: 400,
movie2.on('load', function() {
movie.sendMessage({ foo: "bar" });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment