I an trying to debug why a script isn’t working in firefox but is in other programs. Part of the excellent chirp.js has the line:
script = document.scripts[document.scripts.length-1]
Which throws the error: document.scripts is undefined
So I run document.scripts in the firebug console and it returns undefined, as you would expect, so I head over to Mozilla and see if it’s called something else and it’s listed there as being accessible. I type the same thing into the Chrome console and I get a list of scripts loaded.
This happens on my machine and my client’s too, so I’m guessing it’s not a plugin/addon issue?
I get the same error on the chirp project page.
Anyone come across this issue before? I tried googling, but get pages of results relating to the document.scripts object and no problems.
Something else isn’t right here. Even writing the following will give you a length of 1:
Try that in your Firefox installation. If that works then something else is wrong.
Note: I tested it in the latest version of Firefox for Mac as of 1/23/13.