You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: