gwtbrowser-historyhistory.jsgwt-historyhtml5-history

How to use History.js with GWT?


I want to use History.js from Google Web Toolkit.

I know GWT has History functionality of it's own, but I don't like it because it uses the hashes in the URI, I want to use the new HTML5 History API as much as possible.

The only current way that I can think of to run History.js and GWT together is to write the History.js part in plain Javascript (or jQuery) and then manually call a GWT method.

It would be nice if it was possible to use the whole History.js functionality from within GWT's Java files.


Solution

  • No pain at all with that .

    You just simple add your History js file on your document and you can use it .

    Here i answered how you can use an external js in GWT .

    Using externel js in GWT

    After you call the native method you can continue with gwt method