Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version validation support #19

Open
kengu opened this issue Nov 29, 2012 · 1 comment
Open

Add version validation support #19

kengu opened this issue Nov 29, 2012 · 1 comment
Assignees

Comments

@kengu
Copy link
Owner

kengu commented Nov 29, 2012

I see that we need to add some version validation support for JSNI wrapper methods. This also involves allowing the user to choose which version of wrapped 3rd-party js-script should be loaded by GWT.

I see two options,

*Add multiple .gwt.xml module definitions, each specifying a different 3rd-party version.

This is easy to implement. For example leaflet version 0.4.5 becomes *.Core_045.gwt.xml. This approach could also be adapted to user-specified leaflet library where the path is hard-coded to a location which the user has access to, for example *.Core_custom.gwt.xml includes .../WEB-INF/lib/leaflet/custom/leaflet.js.

Add method for support for user-specified version

This is more flexible, but have serveral issues which makes the code more complex. First of all, any version-to-js mapping must be specified such that the 3rd-party library is loaded BEFORE any GWT entry-point is loaded. GWT solves this for us when scripts tags are specified in the *.gwt.xml file. There are solutions to this problem, but it involves callbacks which make the code less readable. I have some ideas on how to overcome this problem.

I think the last options is the best. I will look into it and report back.

@ghost ghost assigned kengu Nov 29, 2012
@kengu
Copy link
Owner Author

kengu commented Dec 10, 2012

Progress! I've managed to decode the requirements for cross-browser support for dynamic loading of third-party client-side libraries (javascript and css files) using GWT, which implements the last method described above.

I'm currently working on unit-tests and I expect to push these changes shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant