I would like to load and run an external js file after DOM loaded, the external js file like:
<script type="text/javascript" src="http://example.com/example.js"></script>
below is the onLoad hook:
@Override
protected void onLoad()
{
super.onLoad();
//how to load and run the whole js file?
}
Thanks
Have a look at
ScriptInjector, and don’t forgetsetWindow(TOP_WINDOW)