[GSOC 2016] persisting tabs across app restart
Paul <[email protected]> Sun, 26 Jun 2016 23:18:23 -0400
| Newsgroups | gmane.comp.mozilla.devel.calendar |
|---|---|
| Message-ID | <[email protected]> |
Hi, I'm working on persisting tabs across app restart, for the event in a tab project. The basic mechanism in the tabmail interface is to save a JS object that contains the tab data/state as a JS object with the persistTab function and then in the restoretab function use that data/state in a call to openTab. So what we want to store is the same as the aArgs argument to openTab, which we kept when opening the tab (as window.arguments[0] from within the iframe). Seems simple enough, but... In that aArgs object the calendarEvent, calendar, and initialStartDateValue values are "XPCWrappedNative_NoHelper"[1] but between when aArgs is saved by persistTab and passed to restoreTab these values have become standard empty JS objects. (In persistTab I have tried just returning aTab.iframe.contentWindow.arguments[0] and using Object.assign() to clone that object to a new one and returning it. Same result for both.) Any ideas on how to solve this? Thanks, -Paul [1] https://dxr.mozilla.org/comm-central/source/mozilla/js/xpconnect/src/XPCWrappedNativeJSOps.cpp#644