User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 Build ID: 20170123004004 Steps to reproduce: I attempted to update my XPCOM extension (https://addons.mozilla.org/en-US/firefox/addon/historyblock/) to Web Extension and found some of the core APIs missing. Actual results: Specifically, HistoryBlock relies on `nsIBrowserHistory.removePagesFromHost` as well as `nsISessionStore.forgetClosedTab` and `nsISessionStore.forgetClosedWindow` (currently, only the former, but I would like both). Expected results: It would be extremely helpful if the `sessions` Web Extension API included `forgetClosedTab` and `forgetClosedWindow`, and if the `history` Web Extension API included `removePagesFromHost` (though, I can probably get by with the existing `deleteUrl`... maybe).
For some context on HistoryBlock (https://addons.mozilla.org/en-US/firefox/addon/historyblock/): HistoryBlock allows users to store hashed hostnames in a blacklist, and when a user visits a blacklisted website the history entries are immediately purged. Additionally, if a tab is closed (and hopefully in an upcoming version, if a window is closed) containing a blacklisted hostname, then it is purged from the 'Recently Closed Tabs/Windows' list. Additionally, cache entries appear to also be purged, though there is no API call for that other than via the history manager's `removePagesFromHost`.
I have created an experimental implementation of the two session APIs I require: https://github.com/kainsavage/moresessions
Additionally, after some experimentation, I do not require `removePagesFromHost` as `browser.history.deleteUrl` is sufficient.
This has been added to the March 7 WebExtensions Triage meeting agenda. Agenda: https://docs.google.com/document/d/1zzfedbTKAHUmm4UctxSOIJV3iKayXQ8TuXPodXW8wC0/edit#
Kain, this proposal has been approved, and we think it makes sense to implement these functions directly in the sessions API, rather than as an experiment. Is this something you are interested in working on?
Bob, I would love to work on this directly, but my schedule has gotten extremely busy of late (notice, I have not even submitted the pull request for my experiment yet and I said I would do that two weeks ago... apologies). If there is no one else willing/able to work on it, I would happily donate some time as it becomes available to me, but I do not know when that will be.
Thanks for the update, Kain. I will unassign you in case someone else comes along who wants to work on it, but when you do find the time please feel free to pick it up where you left off.