Closed kainsavage closed 6 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.
Closing issue - this API landed in Firefox 55. 🎉
https://github.com/kainsavage/moresessions
moresessions
is a Web Extension Experiment that provides API support forforgetClosedTab
andforgetClosedWindow
from the XPCOMnsISessionStore
.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 andmoresessions
would go away.