How to remove all history

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

How to remove all history

Post by leslie2017 »

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 ... veAllPages()
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: 3664
Joined: September 15th, 2010, 9:03 am

Re: How to remove all history

Post by lithopsian »

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