Javascript 51
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 […]
Working With Web Worker Part2
In my previous post we have learn creating a dedicated worker. In this demo, “We will learn to create a dedicate worker for generating time with Hour,Minute and Second”. To develop this dedicated worker we have created 2 files dateWorker.js and dateWorkerDemo.html. The dateWorker.js file contains the code definition of the date worker. The dateWorkerDemo.html […]
Working With Web Worker Part1
Web Worker provides a way to get Concurrency in JavaScript programming. Web Worker runs in browsers background. Web Worker are available in 2 different taste Dedicated and Shared worker. In this demo, “We will learn to create a dedicated worker which will generate square of number”. We can check the browser support for Web Worker […]