function dot toString()

function.toString() has different behavior between IE and FF. FF collapses the parameter list onto one line, while IE leaves it untouched. Ex:

function f(
  param1,
  param2,
  param3){
  ...
}
f.toString();

In FF you would get something like:

function(param1, param2, param3){
...
}

in IE:

function f(
  param1,
  param2,
  param3){
...
}


In IE, this breaks function.argumentNames() in prototype.js, so don't break the parameter list into multiple lines if you are using prototype.js, or until they fix it. Also, notice that FF removes the name of the function in the toString() output.

blog comments powered by Disqus