In this practice exercise, you create several short and simple pieces of code related to Web Workers. To complete the tasks required, you should:
- Understand HTML5 in general
- Be familiar with the basics of APIs
- Know how Web Workers communicate
Complete the following tasks:
- After a Web Worker is spawned, what method do you use to handle the communication between the Web Worker and its parent page? How is it used?
- Messages that Web Workers pass are accessed using what event in the main page?
- What distinguishes the shared Web Worker from the dedicated Web Worker?
Follow these solution steps to check your work.
- "HTML5 fundamentals, Part 3: The power of HTML5 APIs" (developerWorks, June 2011) provides an overview of two new HTML5 APIs: Geolocation and Web Workers.
- The Web Workers specification published by the WHATWG provides detailed worker information.
- "Create modern Web sites using HTML5 and CSS3" (developerWorks, March 2010) is a multi-component HTML5 and CSS3 tutorial.
- In "New elements in HTML 5" (developerWorks, August 2007), you will find information for several of the new elements in HTML5.
- The <html>5doctor, website provides an excellent view of the current trends in HTML5 today.
- The W3Schools.com: HTML5 Tag Reference provides an extensive list of the HTML5 tags and definitions as well as examples.
- The WHATWG website provides detailed information for the HTML5 specification.
- Stay current with developerWorks technical events and webcasts focused on a variety of IBM products and IT industry topics.
- Follow developerWorks on Twitter.
Dig deeper into Web development on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Experiment with new directions in software development.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.