addEventListener('connect', function(e) { name = 1; e.ports[0].postMessage(name); }, false);