diff options
Diffstat (limited to 'dom/messagechannel/tests/sharedWorker_messageChannel.js')
-rw-r--r-- | dom/messagechannel/tests/sharedWorker_messageChannel.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dom/messagechannel/tests/sharedWorker_messageChannel.js b/dom/messagechannel/tests/sharedWorker_messageChannel.js new file mode 100644 index 000000000..4b24642f9 --- /dev/null +++ b/dom/messagechannel/tests/sharedWorker_messageChannel.js @@ -0,0 +1,8 @@ +onconnect = function(evt) { + var mc = new MessageChannel(); + + evt.ports[0].postMessage(42, [mc.port2]); + mc.port1.onmessage = function(e) { + mc.port1.postMessage(e.data); + } +} |