A minimal implementation of Statecharts in portable, embeddable JavaScript.