Added dispatchEvent() wrapper method.