Why does jQuery.parseXML ignore two of its parameters?

Why does jQuery.parseXML ignore two of its parameters?

Recently I was reading through the jQuery  code ( jquery-1.5.2.js) and noticed that  parseXML is declared like this (including the comments):

// Cross-browser xml parsing // (xml & tmp used internally) parseXML: function( data , xml , tmp ) {

...
}

Inside the function, you will find that the parameters  xml and tmp are overwritten before they are used. This means that they are effectively being used as local variables. Therefore, the function could have been declared like this:

parseXML: function( data ) {
var xml, tmp;
...
}

Because of the comments stating that  xml and tmp  are "used internally", it is clear that there was a reason for doing it the first way rather then the second.  Does anybody know what that reason is?  The only thing I can come up with is that the first way saves a few characters, which would help to reduce the size of the code in the minified version. 

    • Topic Participants

    • jlee