Closed mrpelz closed 3 months ago
I see where you are coming from, but I don’t think this should be the default behavior, esp without opt-out. I think transfer handlers let you do this right now without having to patch Comlink.
Oh, I didn’t consider that TransferHandler
’s deserialize
method (which would then be used to augment the Service Worker’s handling of messages) is called with the whole ExtendableEvent
.
Thanks. :)
When exposing from a Service Worker, calling async methods requires handing the resulting Promise to the
ExtendableEvent
’swaitUntil
method, in order to ensure their execution.