Tutorials 4
Working With Web Worker Part6
In my previous post we have learn about error handling in web worker. In this demo, “We will learn about creating Shared Web Worker to calculate length of a string”. A Shared Worker can be used by multiple calling script. A shared worker can be created using new keyword and SharedWorker() constructor function. A Shared […]
Working With Web Worker Part5
In my previous post we have learnt about importing external script to a web worker. In this demo “We will learn to use error handling in Web Worker”. We can throw an error from a web worker using throw keyword. In the calling script we can catch the error by listening to the error event […]
Working With Web Worker Part4
In my previous post we have learn about inline Web Worker scripts. In this demo, “We will learn to import external script inside worker using importScripts() function”. To demonstrate this we have created 3 files greatest-number-script.js,numberWorker.js and numberWorkerDemo.html file. In this demo the greatest-number-script.js file is going to be imported by numberWorker.js file.The greatest-number-script.js file […]
Working With Web Worker Part3
In my previous post we have learn about dedicated worker and created a date time worker. In this demo, “We will learn to create inline worker”. A inline worker can be created using script element and type attribute with value text/worker.The following code shows the syntax of the inline worker script. <script id="multiplyWorker" type="javascript/worker"> //Worker […]