summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/declarative/script.js
blob: f55dee35076ace18044420631890e939dc058c9b (plain)
1
2
3
4
WorkerScript.onMessage = function(message) {
    // ... long-running operations and calculations are done here
    WorkerScript.sendMessage({ 'reply': 'Mouse is at ' + message.x + ',' + message.y })
}