Deletes all visits from the browser's history.
This function triggers
history.onVisitRemoved
just once, with
allHistory
设为
true
and an empty
urls
自变量。
This is an asynchronous function that returns a
Promise
.
var deletingAll = browser.history.deleteAll()
None.
A
Promise
will be fulfilled with no parameters when all history has been deleted.
BCD tables only load in the browser
Delete all history when the user clicks a browser action:
function onDeleteAll() {
console.log("Deleted all history");
}
function deleteAllHistory() {
var deletingAll = browser.history.deleteAll();
deletingAll.then(onDeleteAll);
}
deleteAllHistory();
注意:
This API is based on Chromium's
chrome.history
API. This documentation is derived from
history.json
in the Chromium code.
Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.
最后修改: , 由 MDN 贡献者