Source code
Revision control
Copy as Markdown
Other Tools
onmessage = function(e) {
var message = e.data;
if (typeof message === 'object' && 'port' in message) {
var response = 'Ack for: ' + message.from;
message.port.postMessage(response);
}
};