new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Electron · API · all subjects

navigation-history/methods

14 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

navigationHistory.canGoBack()

Returns a boolean indicating whether the browser can go back to the previous web page.

navigationHistory.canGoForward()

Returns a boolean indicating whether the browser can go forward to the next web page.

navigationHistory.canGoToOffset(offset)

Takes an offset parameter (Integer) and returns a boolean indicating whether the web page can go to the specified relative offset from the current entry.

navigationHistory.clear()

Clears the navigation history.

navigationHistory.getActiveIndex()

Returns an Integer representing the index of the current page, from which the browser would go back, go forward, or reload.

navigationHistory.getEntryAtIndex(index)

Takes an index parameter (Integer) and returns a NavigationEntry at the given index. If the index is out of bounds (greater than history length or less than 0), null is returned.

navigationHistory.goBack()

Makes the browser go back to the previous web page.

navigationHistory.goForward()

Makes the browser go forward to the next web page.

navigationHistory.goToIndex(index)

Takes an index parameter (Integer) and navigates the browser to the specified absolute web page index.

navigationHistory.goToOffset(offset)

Takes an offset parameter (Integer) and navigates to the specified relative offset from the current entry.

navigationHistory.length()

Returns an Integer representing the total length of the history.

navigationHistory.removeEntryAtIndex(index)

Takes an index parameter (Integer) and removes the navigation entry at the given index. Cannot remove the entry at the current active index. Returns a boolean indicating whether the navigation entry was successfully removed from the webContents history.

navigationHistory.getAllEntries()

Returns a NavigationEntry array containing the complete webContents history.

navigationHistory.restore(options)

Restores navigation history and loads the given entry in the stack. Restores not just the navigation stack but also the state of individual pages such as HTML form values or scroll position. Takes an options object with entries (NavigationEntry[], required) from a prior getAllEntries() call, and index (Integer, optional) specifying which stack entry should be loaded. If index is 0, the webContents loads the first oldest entry. If index is undefined, Electron automatically loads the last newest entry. It is recommended to call this API before any navigation entries are created, ideally before calling loadURL() or loadFile() on the webContents object. Returns a Promise that resolves when the page finishes loading the selected navigation entry (when did-finish-load event fires), and rejects if the page fails to load (when did-fail-load event fires). A noop rejection handler is already attached to avoid unhandled rejection errors.

Give your agent this brain