Add new "statechange" event.