[Greasemonkey] Non-descript "Invalid url" error

Josh Staiger joshstaiger at gmail.com
Tue Aug 30 00:32:30 EDT 2005

Hi all,

Big greasemonkey fan, and am very glad to see that 5.1 is out the
door.  Thank you very much!

I do have a small suggestion, however.

On line 61 of xmlhttprequester.js, would it be possible to make the
'Invalid url' message a bit more descriptive if the user passes in an
argument other than a string?

I had an old script that formerly passed the url to GM_xmlhttpRequest
as an <a> link element, and it took a modest amount of frustration to
figure out why this url had suddenly become invalid when I could
GM_log it, and cut and paste it into my browser just fine.

  if (typeof url != "string") {
    throw new Error("Invalid url: url must be of type string");



More information about the Greasemonkey mailing list