Execute scripts appended to DOM by code
-
thatcher.christopher (at gmail)
- State changed from new to open
- Assigned user set to thatcher.christopher (at gmail)
ok I added a new policy file that by default allows the scripts to be executed based on a policy.
By default this is set to
$policy.loadScripts = $env.safeScript;
which will not execute any scripts other than those loaded through rhino.
you can change this to
$policy.loadScripts = $env.loadLocalScripts;
This will load the scripts defined relative to the window.location or inline scripts.
I didnt address loading of remote scripts yet but will do.
This is in http://github.com/thatcher/env-js
going to leave this open until remote scripts are addressed.
-
thatcher.christopher (at gmail)
- Milestone set to 1.0 Release
-
Thatcher
- Tag set to client, loading, script, server, strategy, textenvjs, textjavascript
- Assigned user changed from thatcher.christopher (at gmail) to Thatcher
Still leaving this as open as we push to a 0.1 release.
However I just committed what I think is the best script loading implementation yet. I took the advice from the original ticket post and load if the script ownerDocument is the window document. its loaded relative to window loacation . And as a precaution the scripts is currently only loaded in the type contains text/envjs but also supports ;-delimited types so you can have text/javascript;text/envjs.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.