summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/declarative/script.js
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-01-30 14:16:15 +1000
committerMatthew Vogt <matthew.vogt@nokia.com>2012-01-30 14:16:15 +1000
commit12a5ddf456ba8549645a8cb28a8b4ed6197a14da (patch)
tree63ee2c88af936e0609a3a194f5bcc304c4c0b707 /doc/src/snippets/declarative/script.js
Import relevant source from Qt 4.8
Diffstat (limited to 'doc/src/snippets/declarative/script.js')
-rw-r--r--doc/src/snippets/declarative/script.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/src/snippets/declarative/script.js b/doc/src/snippets/declarative/script.js
new file mode 100644
index 00000000..f55dee35
--- /dev/null
+++ b/doc/src/snippets/declarative/script.js
@@ -0,0 +1,4 @@
+WorkerScript.onMessage = function(message) {
+ // ... long-running operations and calculations are done here
+ WorkerScript.sendMessage({ 'reply': 'Mouse is at ' + message.x + ',' + message.y })
+}