uxebu / bonsai

BonsaiJS is a graphics library and renderer
http://bonsaijs.org
Other
1.96k stars 189 forks source link

Change submovie execution back to XHR/Function for every environment #204

Open davidaurelio opened 11 years ago

davidaurelio commented 11 years ago

At the moment, submovies are fetched end executed differently for every environment:

This has consequences like different scoping depending on the environment, and nearly-identical-but-slightly-different code fragments in context specific code.

We’ve introduced this behavior to make debugging in iframes easier and get real filenames in logs and debugged source code.

This is also possible by simply appending a special comment to the generated function, at least for webkit: //@ sourceURL=script/url.js

Using comments would allow us to remove redundant code and logic