when i transfer objects or functions from the backgroundPage to my contentscript they become unusable (i can't call the function because they are not seen as functions), but ordinary string values work. Is there something i am missing. Thanks
1 Answer
You can't do that, the message is serialized before transmitting. See https://developer.mozilla.org/en/DOM/The_structured_clone_algorithm . Specifically:
Error and Function objects cannot be duplicated by the structured clone algorithm; attempting to do so will throw a DATA_CLONE_ERR exception.