on() method should throw TypeError alert must specify a type name