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.
|
toString
public HistoryStateChangeEvent(History history, elemental.json.JsonValue state, Location location, NavigationTrigger trigger)
history
- the history instance that fired the event, not
null
state
- the history state from the browser, null
if
no state was providedlocation
- the new browser location, not null
trigger
- the type of user action that triggered this history
change, not null
public History getSource()
getSource
in class EventObject
public Location getLocation()
public Optional<elemental.json.JsonValue> getState()
public NavigationTrigger getTrigger()
null
Copyright © 2019. All rights reserved.