Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
davidaurelio opened this issue Mar 14, 2013 · 0 comments
Open

Comments

@davidaurelio
Copy link
Contributor

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

  • in workers, the script is fetched via XHR and executed as a Function()
  • in iframes, the script is run in a sub-iframe
  • in node, the script is read from the file system and executed as a Function()

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant