This example only works in browsers that support the
textInput
event.