public static class History.HistoryStateChangeEvent extends EventObject
This happens when PopStateEvent is fired in the browser, or
when routing has been triggered by user clicking a link marked with
attribute .
Note that this event is not fired when only the hash has changed!
source| Constructor and Description |
|---|
HistoryStateChangeEvent(History history,
elemental.json.JsonValue state,
Location location,
NavigationTrigger trigger)
Creates a new event.
|
| Modifier and Type | Method and Description |
|---|---|
Location |
getLocation()
Gets the location that was opened.
|
History |
getSource() |
Optional<elemental.json.JsonValue> |
getState()
Gets the history state value as JSON.
|
NavigationTrigger |
getTrigger()
Gets the type of user action that triggered this history change.
|
toStringpublic HistoryStateChangeEvent(History history, elemental.json.JsonValue state, Location location, NavigationTrigger trigger)
history - the history instance that fired the event, not
nullstate - the history state from the browser, null if
no state was providedlocation - the new browser location, not nulltrigger - the type of user action that triggered this history
change, not nullpublic History getSource()
getSource in class EventObjectpublic Location getLocation()
public Optional<elemental.json.JsonValue> getState()
public NavigationTrigger getTrigger()
nullCopyright © 2025. All rights reserved.