-
Notifications
You must be signed in to change notification settings - Fork 1k
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
AIR Sandbox #16
Comments
+1 please fix that. |
Do you mean that any js file that is loaded in the browser, and which uses new Function() in the context of an AIR application will fail? That's a big restriction to put on all javascript platforms. Even jQuery itself uses it (in parseJSON). Or is it some error arising in the specific instance of a call to new Function() in buildTmplFn? In that case, does the error occur no matter what template you are using? |
Unfortunately this restriction is very real, and very frustrating: See official documentation: Any suggestions on how to overcome this? |
Does $.parseJSON(...) also generate a violation? |
$.parseJSON uses JSON.parse when available, which is probably the case in Adobe AIR. |
parseJSON seems to work fine. We are still using jquery-tmpl, the work around has been to compile all of the templates when the application starts, before the body onload event as obviously it is only the compilation that generates the sandbox violation. |
Could you clarify what "when the application starts" means? Is that an acceptable workaround, or is this issue still big enough that it should be resolved within the template plugin? |
when the application starts means before the onload event. Is it an acceptable workaround? Probably not. Unfortunately it's an inherent limitation of Adobe Air, and on reflection it probably isn't worth the time figuring out a fix. |
Closing issue for now. |
new Function() generate a Sandobox violation in Adobe AIR,so it's not possible to use this plugin to write an AIR application
The text was updated successfully, but these errors were encountered: