In all the examples I've seen, they look like this
onconnect = function(e) { var port = e.ports[0]; port.onmessage = function(e) { var workerResult = 'Result: ' + (e.data[0] * e.data[1]); port.postMessage(workerResult); } port.start(); }
Is there an instance in which an array of ports will have more than one element? Using chrome: // check on SharedWorker and print e , I get

no matter how many instances are generated in conjunction with SharedWorker, where the length is always 1. Why is it not just a MessageEvent, not an array? What use case is needed for this array?
source share