The joys of JavaScript error messages
Today I meant to type
someObject.someProperty
but instead I typed someObject..someProperty
with the incorrect extra period.
Firefox kicked back the amazingly helpful
XML descendants internal method called on incompatible Object
which I stared at dumbfounded. All of Firebug's glorious power was seemingly useless against this error. It didn't help that I was working atop a custom Dojo build.
Then I flipped back to my editor which thankfully still had the cursor next to the extra period. A simple backspace and I was moving again...
19 comments:
thanks, man.I had the same error and you saved me a couple of minutes.
Same here! Damn typo's! Thanks!
Thanks... this error looked a bit scary at first glance... but as I suspected, it was all bark and no bite. Thanks for the quick synopsis on what was causing it! :D
THANK YOU! THANK YOU! Same double-period, I'm glad you posted this!
Same here.. Thanks a ton!!
Thanks a bunch. Your post saved a lot of time.
Saved me some time too. Thanks.
God damn, saved me crying after finally cobbling together my first javascript page...
A thousand thankyous!!
Cheres just saved me hours trying to find out what that meant!
Thanks :-)
i've written username..val() while validating!!
have beer! ;)
Great tip. Saved me loads of time I'm sure!
Thanks a zillion. Indeed Firebug did all the work for me.
One more thanks for pin-pointing the error!
However, a cautionary note if you encounter a double-period in your code; it may not simply be a extra period, it could be a missing element in the object definition. For example, "this..id" may really have been "this.wibble.id". So it might not just be a case of removing one of the periods.
I know, I was that marine...
OH MAN AWESOME THANK YOU
Thanks a lot mate :)
You just saved me. Facepalm! Thanks for posting!
oh man thank u soo much
WOW i dont believe it LOL it was that :) thanks a lot
I just spended 1 hour of my life in this! Double f***ing periods
Post a Comment