Hi all,
I was wondering which of these methods would be better. Both situations they are trying to establish MessageChannel
communication between framescript and content so I can transfer arraybuffers.
Method 1 - Tap scope and share ports
Framescript does this:
var msgchan = new content.MessageChannel();
var port1 = msgchan.port1;
Method 2 - Spawn worker and transfer between three scopes
Framescript spawns a WebWorker. The WebWorker does new MessageChannel()
and then transfers to the framescript the ports.
Framescript then transfers one of the ports to content
with content.postMessage
.
Thanks