Show TOC

History MethodsLocate this document in the navigation structure

Use

You can use the following methods to access and manipulate history entries, as well as control navigation through the history.

addEntry(entry, isPostBody)

Adds a history entry

Parameters

  • entry: A HistoryEntry object with all properties set

  • isPostBody: A boolean value, indicating whether the post parameters are available

createEntry(URL, title, params, context, postBody, pathIndexes, fullURL)

Creates a HistoryEntry object with the specified parameters.

For details, see HistoryEntry Object

getCurrentEntryIndex()

Returns the index of the current entry in the history

getEntries()

Returns all history entries as an array of HistoryEntry objects

getEntry(index)

Returns the history entry with the specified index as a HistoryEntry object

getLastEntry()

Returns the last visited entry as a HistoryEntry object

getNumberOfEntries()

Returns the number of entries in the history

removeEntries(fromIndex, toIndex)

Removes all history entries in the range specified by the fromIndex and toIndex parameters

removeEntry(index)

Removes the history entry with the specified index parameter

back(navigate)

Retrieves the entry visited before the current one. If the doNavigate parameter is set to true, navigates to this entry.

forward(navigate)

Retrieves the entry visited after the current one. If the doNavigate parameter is set to true, navigates to this entry.

isBackwardEnabled()

Returns a boolean indicating whether backward navigation is possible

isForwardEnabled()

Returns a boolean indicating whether forward navigation is possible

navigateToEntry(index)

Navigates to the history entry specified by the index parameter