If you see this returned by the Error object that gets passed with a try {} catch {} throw or a window.onError throw - it ends up not being very helpful. I've scoured information for some time on some areas that you might want to look at in your Javascript code that might be the cause of the issue:
mal-formed Javascript style changes
A lot of the time you'll be dynamically setting styles in Javascript, i.e. the width of a div as follows:
You must be sure that newWidthValue is in fact an instanceof Number or that it does not equal null or that it does not equal NaN either. parseInt() itself will return a NaN in certain conditions. For instance if:
newWidthValue = 'NOTNUMERIC';
alert(parseInt(newWidthValue )); // will alert with NaN
document.getElementById('obscureDiv').style.width = parseInt(newWidthValue) + 'px'; // will throw "Invalid Argument" error because it will be trying to set the width to 'NaNpx'
adding child nodes to document
Always appendChild(), replaceChild() or insertBefore() before setting any of the new element's attributes:
Always use a createElement() function on the same document you're going to be calling appendChild() or replaceChild(). A lot of time you'll see (with frames and iframes):
var newDiv = document.getElementById('obscureDocument').document.createElement('div');
document.getElementById('obscureDocument').document.appendChild(newDiv);
eval()
Watch for these errors being caused by mal-formed dynamic eval()s.
odd causes with Internet Explorer
Found an odd one today with IE7 throwing the Invalid Argument error with the following:
onMouseOver="this.style.clip='auto';"
// or
onMouseOver="this.style.clip='';"
This was all with doctype: "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"