gwt-pushstate
gwt-pushstate copied to clipboard
Check/Ensure compatibility with GWT 2.7
Related to https://issues.jboss.org/browse/ERRAI-805
If compatibility with both GWT 2.6- and 2.7+ is desired the following approach is an option.
- Remove the HistoryImpl base class from HistoryImplPushSate
- Move the required and previously inherited methods to HistoryImplPushState
- Remove the rebind rules in PushState.gwt.xml
- Provide an alternative History utility class (i.e. PushStateHistory) with static methods (i.e. newItem) that dispatch to an HistoryImplPushState instance
- Users will then have to use this new utility class instead of com.google.gwt.user.client.History
Not ideal, but this is what I've done in Errai for now to support both GWT 2.7 and 2.6-. Here's the commit: https://github.com/errai/errai/commit/c79bf90e825575d15c30938dd624e875f8b07b82
While this make sense from our perspective (it fixes the compatibility problem and retains the functionality), I am not sure it's the best solution for your lib.