How To Parse And Evaluate JavaScript In GWT
Join the DZone community and get the full member experience.
Join For FreeIf you have a service that returns JavaScript (e.g. for Google Analytics), the following code should do the trick. You can call it using something like:
evalScripts(new HTML(response.getText()).getElement())
/**
* Evaluate scripts in an HTML string. Will eval both
* and