Fix typo and state that any change to a different state fires the
onstatechange event.
Merge pull request #434 from rtoy/rtoy-onstatechange-transitions

Fix typo and state that any change to a different state fires the onstatechange event