HTML API's

By: Dustin Sokolik

The Web Worker API

A web worker is a JavaScript running in the background, without affecting the performance of the page.

What is a Web Worker?

When executing scripts in an HTML page, the page becomes unresponsive until the script is finished.

A web worker is a JavaScript that runs in the background, independently of other scripts, without affecting the performance of the page. You can continue to do whatever you want: clicking, selecting things, etc., while the web worker runs in the background.

My example:

This Web Worker will countdown from 500 to 0 and at 0 it will stop. All you have to do is click "Start Countdown".
You can also stop the countdown at anytime by clicking the "Stop Countdown" button.

Countdown:

The Drag and Drop API

Drag and drop is a very common feature. It is when you "grab" an object and drag it to a different location.

My Example:

My "Drag and Drop" example will be 4 cards of lorem ipsum text that can be rearranged.

Using this API I will allow for the movement of these cards into any order the user wishes, Just like you can on Blackhawk's new student portal.

This is the first lorem, Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quo ipsa quia hic at consequatur sequi inventore ad accusantium nobis fuga asperiores, maiores perferendis dicta sapiente doloremque cumque voluptates dolorem in.

This is the second lorem, Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quo ipsa quia hic at consequatur sequi inventore ad accusantium nobis fuga asperiores, maiores perferendis dicta sapiente doloremque cumque voluptates dolorem in.

This is the third lorem, Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quo ipsa quia hic at consequatur sequi inventore ad accusantium nobis fuga asperiores, maiores perferendis dicta sapiente doloremque cumque voluptates dolorem in.

This is the fourth lorem, Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quo ipsa quia hic at consequatur sequi inventore ad accusantium nobis fuga asperiores, maiores perferendis dicta sapiente doloremque cumque voluptates dolorem in.