MozillaZine

How to remove all history

Talk about add-ons and extension development.
leslie2017
 
Posts: 1
Joined: August 3rd, 2017, 12:14 am

Post Posted August 3rd, 2017, 12:19 am

i want to remove all history in my XUL overlay extension. the codes is pasted below.

Code: Select all
var browserHistory = Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsIBrowserHistory);
browserHistory.removeAllPages()


I find this in https://developer.mozilla.org/en-US/doc ... eAllPages()
but "removeAllPages is undefined" error occurs.

Firefox version: 52 ESR.

I want to know how to remove all history in XUL overlay extension

lithopsian
 
Posts: 3663
Joined: September 15th, 2010, 9:03 am

Post Posted August 4th, 2017, 6:05 am

removeAllPages() was deprecated in Firefox 45 and removed in Firefox 48. There is now PlacesUtils.history.clear().

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 1 guest