nolanlawson / promise-worker

Promise-based messaging for Web Workers and Service Workers
Apache License 2.0
478 stars 40 forks source link

"cannot read property "postMessage" of null" in Chrome <51 #7

Closed nolanlawson closed 8 years ago

nolanlawson commented 8 years ago

Seems we're running into this bug, which was fixed in Chrome 51: https://bugs.chromium.org/p/chromium/issues/detail?id=543198

nolanlawson commented 8 years ago

Seems this can be worked around using MessageChannels: http://stackoverflow.com/questions/30177782/chrome-serviceworker-postmessage

nolanlawson commented 8 years ago

OK, challenge accepted. Let's see if I can get this working in all versions of Chrome.

nolanlawson commented 8 years ago

Fixed by c60ba24ee434f3d013ef0d8749b8dbf907af79af