web-ext-experiments / about

Please see the documentation here: https://webextensions-experiments.readthedocs.io
Other
9 stars 15 forks source link

forgetClosedTab / forgetClosedWindow Web Extension Experiment #11

Closed kainsavage closed 6 years ago

kainsavage commented 7 years ago

https://github.com/kainsavage/moresessions

moresessions is a Web Extension Experiment that provides API support for forgetClosedTab and forgetClosedWindow from the XPCOM nsISessionStore.

https://bugzilla.mozilla.org/show_bug.cgi?id=1334266

I do not mind moving the code to this repository (and I can open a pull request if needed)

Ideally, these would be merged into the browser.sessions API and moresessions would go away.

bobsilverberg commented 7 years ago

@kainsavage I'm sorry I missed the meeting today where this was discussed, but I saw some of the chatter on IRC about it.

You mentioned not wanting to have to use JSON.parse and you actually don't need to. If you use SessionStore.jsm instead of nsISessionStore there is an option to call both getClosedTabData and getClosedWindowData and request that an object be returned rather than JSON. I updated both of those methods via bug 1309702 when I was writing ext-sessions.js.

There was also some discussion about adding unit tests for these new API methods and I think that is an excellent idea.

Please let me know if you need any further help with this.

caitmuenster commented 6 years ago

Closing issue - this API landed in Firefox 55. 🎉