I have a flex application that requires the ability to generate and execute JavaScript. When I say this, I mean that I need to execute the raw JavaScript that I create in my Flex application (and not just the existing JavaScript method)
I am currently doing this by exposing the following JavaScript method:
function doScript(js){ eval(js);}
Then I can do something similar in Flex (note: I am doing something more substantial than the warning field in a real Flex application):
ExternalInterface.call("doScript","alert('foo'));
My question is that this poses any security risk, I assume that it is not, since Flex and JasvaScript all work on the client side ...
Is there a better way to do this?
source share