Fix JS in fromeventpattern doc