[whatwg] Define MessagePort.isConnected or MessagePort.ondisconnect
ATSUSHI TAKAYAMA
taka.atsushi at googlemail.com
Mon Mar 15 20:17:18 PDT 2010
> If you don't need to ever broadcast something to all the ports, you can
> avoid keeping track of the ports altogether, and then you won't have a
> problem. If you do need to broadcast, it's hard not to slowly leak at the
> moment.
Even with the example below, "port" and "port.onmessage" will be
created every time I reload the tab, and they will never be cleaned as
long as I don't close all the pages.
=== <JS> ==
onconnect = function(e) {
var port = e.ports[0];
port.onmessage = function() {
port.postMessage('yes');
}
}
=== </JS> ==
More information about the whatwg
mailing list