examples/declarative/threading/threadedlistmodel/dataloader.js
changeset 30 5dc02b23752f
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
       
     1 // ![0]
       
     2 WorkerScript.onMessage = function(msg) {
       
     3     if (msg.action == 'appendCurrentTime') {
       
     4         var data = {'time': new Date().toTimeString()};
       
     5         msg.model.append(data);
       
     6         msg.model.sync();   // updates the changes to the list
       
     7     }
       
     8 }
       
     9 // ![0]