I do not believe you will need the single quotes on the invokeScript method when you pass the parameter. Have you tried without the single quotes? It might also be the eventName argument. Objects within the page cannot be passed in as parameters since they don't exist inside the automation. I would try creating a simple function using ExecuteScript and then invoke it to be certain it is the single quotes and not the other argument.