Finite state machines in JavaScript, Part 3, Test the widget

Develop browser apps with JavaScript and finite state machines

From the developerWorks archives

Edward Pring

Date archived: January 4, 2017 | First published: March 13, 2007

In this series you learn to use how a finite state machine to methodically design complex behavior for a simple Web widget -- an animated tooltip that fades into and out of view. The resulting code is compact and concise, its logic is transparent, and its animation performs smoothly even on heavily loaded processors. In this article, learn how to deal with practical issues to make the implementation work in all popular Web browsers, and wrap things up.

Part 1 showed how to use a finite state machine to methodically design complex behavior for a simple Web widget. Part 2 described how to implement that behavior in JavaScript, and take full advantage of its distinctive language features, including associative arrays and function closures.

This content is no longer being updated or maintained. The full article is provided "as is" in a PDF file. Given the rapid evolution of technology, some steps and illustrations may have changed.



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Web development, Java development
ArticleID=201523
ArticleTitle=Finite state machines in JavaScript, Part 3: Test the widget
publish-date=03132007