Why do I get errors when using my iPad touch screen

When running Processing sketches in Safari on my iPad, I keep getting the console popping up with “Script Error” every time I touch the screen. Yet the touch is detected properly as mouse input. It is just a nuisance to constantly have to close the console.