1

I want to add external Javascript library to my GWT application. The library should be downloaded from external location or can be placed in my webapp folder. I want to call its methods from GWT JSNI.

I know that I can add tag into HTML file of my GWT app. But a problem is that I dont want to load that library in all the places of my GWT application. I want to load it only if user opens some Widget. The reason for this is that the library runs some script on load.

So how can I incorporate external Javascript library into some GWT widget without placing it into GWT application HTML page?

1 Answer 1

2

You can use GWT ScriptInjector:

http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/core/client/ScriptInjector.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.