I am using the new(ish) chrome.storage.sync API for a chrome extension and the when saving objects, it completely ignores functions.
This means that when I retrieve objects from storage, I have the data in the object, but no functions.
Is there a way to reconnect the object's data to its functions?
Note: I'm not doing anything weird in the functions (like adding variables to it or changing its closure)
You basically need to run your object through a constructor function after it comes out the data storage thing.
I don't think there is a way to save functions persistently.
You could save an object with like.. self.fns=['fn1','fn2']; and on reload, add the functions back based on that.
But you should probably change your design if you are dynamically adding functions to things and need to save them that way.