You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose to make message-passing object serialization logic work the same as for postMessage.
In my particular case, I want an extension to back up data to a file periodically. Currently, I have to use IndexedDB to pass the file handler to the service worker. (There are more hurdles to overcome before I could write to a file periodically, but those are out of the scope of this proposal.)
The text was updated successfully, but these errors were encountered:
NV
changed the title
Message passing: can't pass file handler or other objects that aren't JSON-serializable
Message passing: can't pass file handle or other objects that aren't JSON-serializable
Jul 23, 2023
P.S. For chrome-extension:// scripts (i.e. not content scripts) there's a faster workaround: serviceWorker messaging (the example calls register() but you won't need to).
Currently, it isn't possible to pass the file handler object using browser.runtime.sendMessage, yet it works fine with window.postMessage.
I propose to make message-passing object serialization logic work the same as for postMessage.
In my particular case, I want an extension to back up data to a file periodically. Currently, I have to use IndexedDB to pass the file handler to the service worker. (There are more hurdles to overcome before I could write to a file periodically, but those are out of the scope of this proposal.)
The text was updated successfully, but these errors were encountered: