[Webkit-unassigned] [Bug 181648] New: Service worker postMessage
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jan 15 06:55:05 PST 2018
https://bugs.webkit.org/show_bug.cgi?id=181648
Bug ID: 181648
Summary: Service worker postMessage
Product: WebKit
Version: Safari Technology Preview
Hardware: Macintosh
OS: macOS 10.13
Status: NEW
Severity: Blocker
Priority: P2
Component: New Bugs
Assignee: webkit-unassigned at lists.webkit.org
Reporter: coertzen.jfs at gmail.com
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]);
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180115/f25b2861/attachment.html>
More information about the webkit-unassigned
mailing list