Skip to content

Latest commit

 

History

History
101 lines (62 loc) · 2.19 KB

File metadata and controls

101 lines (62 loc) · 2.19 KB

history

Documentation: Chrome History API

A promise-based wrapper for the Chrome history API to manage browser history.

Methods

Events


addHistoryUrl

addHistoryUrl(url: string): Promise<void>

Adds the specified URL to the browser history.

deleteAllHistory

deleteAllHistory(): Promise<void>

Deletes all entries from the browser history.

deleteRangeHistory

deleteRangeHistory(range: chrome.history.Range): Promise<void>

Removes all history entries within the specified time range.

deleteHistoryUrl

deleteHistoryUrl(details: chrome.history.UrlDetails): Promise<void>

Deletes all occurrences of the given URL from the history.

getHistoryVisits

getHistoryVisits(url: string): Promise<chrome.history.VisitItem[]>

Retrieves the visit history for the specified URL.

searchHistory

searchHistory(query: chrome.history.HistoryQuery): Promise<chrome.history.HistoryItem[]>

Searches the browser history with the given query, returning matching history items.

onHistoryVisited

onHistoryVisited(callback: (result: chrome.history.HistoryItem) => void): () => void

Adds a listener triggered when the browser records a page visit. Returns an unsubscribe function.

onHistoryVisitRemoved

onHistoryVisitRemoved(callback: (removed: chrome.history.RemovedResult) => void): () => void

Adds a listener triggered when URLs are removed from the history, providing details of the removal. Returns an unsubscribe function.