[英]How to use History.js with GWT?
I want to use History.js from Google Web Toolkit. 我想使用Google Web Toolkit中的History.js 。
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. 我知道GWT拥有自己的History功能,但我不喜欢它,因为它使用URI中的哈希,我想尽可能多地使用新的HTML5 History API。
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. 我能想到的同时运行History.js和GWT的唯一当前方法是用纯Javascript(或jQuery)编写History.js部分,然后手动调用GWT方法。
It would be nice if it was possible to use the whole History.js functionality from within GWT's Java files. 如果可以从GWT的Java文件中使用整个History.js功能,那就太好了。
No pain at all with that . 一点也不痛。
You just simple add your History js file on your document and you can use it . 您只需在文档中添加History js文件,就可以使用它。
Here i answered how you can use an external js in GWT . 在这里,我回答了如何在GWT中使用外部js。
Using externel js in GWT 在GWT中使用externel js
After you call the native method you can continue with gwt method 调用本机方法后,可以继续使用gwt方法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.