Safari and the “does not allow calls” Javascript error
Posted on September 5, 2005
Filed Under /dev/code/ | 618 views |
If you’re mucking about with Javascript in Safari and the Javascript Console shows you the following error:
Object (result of expression yorFunctionNameHere) does not allow calls.
it might mean you don’t actually have a function named whatever it is you’re trying to call. Ie: in this case I don’t have yorFunctionNameHere but I do have yourFunctionNameHere.
Yo ho ho WebKit you cryptic little minx.
Comments
2 Responses to “Safari and the “does not allow calls” Javascript error”
Leave a Reply
THANK YOU.
I was going mad.
It turns out that my .js file was in the wrong place. So in my case, I not only didn’t have the function, I wasn’t importing the script file at all.
Great error message, Apple. Very helpful (not).
It’s just about one of the most cryptic, generalized error messages I’ve seen. Hopefully that area of Safari will receive some attention in the near future.
When debugging JS it’s almost always beneficial to also be testing in Firefox - the javascript debugging there is far, far superior.