Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  HTML5 Web Worker

Web Worker is a JavaScript multithreading solution provided by HTML5. we can put some compute intensive codes into Web Worker and it will not hang the user interface.1. How to use Web WorkerWeb Worker's basic mechanism is to use Worker to load a JavaScript file to create a new thread in JavaScript's main thread. It will not block other thread's execution and will provide a data exchange interface between main thread and new thread : postMessage() and onmessage.Let's look at an example://worker.jsonmessage =function (evt){ var d = evt.data;//Get sent data with evt.data postMessage( d );//Send...

9,300 0       JAVASCRIPT HTML WEB WORKER