The functions %HI_NavHistoryPushState and %HI_NavHistoryReplaceState
allow support of the browser navigation history (buttons forward/backward) and support
referenceable and bookmarkable URL.
The %HI_NavHistoryPushState function inserts a new event in browsing history in the browser.
The objState parameter is saved to this event and the urlState parameter is added/modified to URL.
After pressing the forward/backward button in the browser, it is called event OnNavHistoryPopState,
where these saved parameters are accessible.
Since urlState parameter remains saved in the URL and the URL can be bookmarked/shared, then after the next opening
it is possible to set the user interface to the desired state.
After opening the picture, the state of urlState parameter can be read by the %HI_NavHistoryGetInitialState function.
The %HI_NavHistoryReplaceState function works like the %HI_NavHistoryPushState function,
but instead inserting a new record in the history it replaces the current one.
Declaration
%HI_NavHistoryPushState(
TEXT in _objState,
TEXT in _urlState
)
HI_NavHistoryReplaceState(
TEXT in _objState,
TEXT in _urlState
)
Parameters
objState
Text parameter that ties with a record in history.
0 komentárov