Get started using the powerful new HTML5 Worker object.
Developed exclusively for Ext, the Ext.ux.Worker provides an Ext Observable wrapper class around this new threaded object (currently supported on recent versions of FireFox 3.1+, Chrome, and Safari).
What about IE, though?
Fear not, you can deploy HTML5 worker scripts on IE (or other non-HTML5-compliant browser) using the included GenericWorker object (they just won't be truly threaded).
The ux.Worker package assigns
for those browsers that do not support it natively.
window.Worker = GenericWorker
What can a Worker do?
Frequently called "Web Workers", these scripted tasks run in a separate thread from the page context that creates them. Compute intensive tasks (heavy loops, number crunching) can be performed in parallel to the renderable portions of your web-page without slowing down the rendering engine. Workers can spawn additional workers to get a complex task done more quickly. Workers can also make XMLHttpRequests (often cross-domain).
Workers are remote-loaded scripts designed to respond to the published event/messaging interfaces which all workers enjoy.
What can't a Worker do?
Workers operate in a protected address space, each with its own global (self) context, and the DOM of hosting browser is off-limits!
There is no window or document object! The only thing they share in common is the navigator and location objects.
Communication between your page and any Worker is accomplished strictly by the use of messaging (postMessage, onmessage, onerror, etc).
What about Google Gears Workers? Can I run HTML5 standards Worker scripts there instead?
Normally, you could not, since Gears Workers support an evolving proprietary API.
But with ux.Workers extension you can run an HTML5 Worker script unmodified as a Gears Worker!
Demo: A live base64-encoding Worker.
See/download more at code.google.com.
Get used to Workers!
You'll be thinking about using them a lot in future projects.