Update example code of .fromEventHandlerFunction