WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 178940
181648
Service worker postMessage
https://bugs.webkit.org/show_bug.cgi?id=181648
Summary
Service worker postMessage
Stephan Coertzen
Reported
2018-01-15 06:55:05 PST
Still getting Error: Passing MessagePort objects to postMessage is not yet supported postMessage@[native code] Code: var msg_chan = new MessageChannel(); msg_chan.port1.onmessage = function(event) { if (event.data.error) { console.log(event.data.error, true); } else { Web.AppCache.ServiceWorkerStartCaching(); } } if (navigator.serviceWorker.controller) navigator.serviceWorker.controller.postMessage({ 'action': 'ClearCache' }, [msg_chan.port2]); else if (Web.ServiceWorkerReg.active) Web.ServiceWorkerReg.active.postMessage({ 'action': 'ClearCache' }, [msg_chan.port2]);
Attachments
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2018-01-16 01:21:02 PST
Thanks Stephan, this is a known limitation. I will dupe it with
https://bugs.webkit.org/show_bug.cgi?id=178940
. Do not hesitate to give feedback on how important it is for you. *** This bug has been marked as a duplicate of
bug 178940
***
Stephan Coertzen
Comment 2
2018-01-16 01:29:14 PST
Thank you. It's important for our application because we need it to be compatible with all browsers (cross platform) regarding offline support. We used applicationCache before but in future browser releases the Service Worker will replace it. Thanks for indicating that you guys are looking at supporting MessageChannel parameter passing.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug