Appears that some libraries may send comm messages with non-transferrable properties, relying on JSON serialization to omit those properties. These messages will throw when sent over an API which requires transferrables, such as a MessageChannel.
This just round-trips messages through JSON.stringify/JSON.parse to omit non-transferrables.
Fix for https://github.com/googlecolab/colab-cdn-widget-manager/issues/10
Appears that some libraries may send comm messages with non-transferrable properties, relying on JSON serialization to omit those properties. These messages will throw when sent over an API which requires transferrables, such as a MessageChannel.
This just round-trips messages through JSON.stringify/JSON.parse to omit non-transferrables.