length property value for functions with parameter enhancements
waldron.rick at gmail.com
Thu Sep 1 08:38:25 PDT 2011
Just want to clarify that neither jQuery nor its selector engine Sizzle have
any occurrences of function arity checking via the function length property.
Both codebases have occurrences of arguments.length checking
On Mon, Aug 29, 2011 at 9:20 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote:
> It looks like that in a number of these cases, what is being tested is the
> number of declared arguments to the jquery Sizzle function which is a
> module function for its selector engine. Very early versions of Sizzle seem
> to have had 3 formals (
> https://github.com/jquery/sizzle/commit/51ba623126501dd9381040bbdcbabe12cc9056db#diff-0 )
> but it fairly soon evolved to take 4 formals (
> https://github.com/jquery/sizzle/blob/8b061ee512c50910d4e8e0247084446d03e90aa3/sizzle.js). I haven't found the code that does the actual test but this seems like
> the most likely reason to make such a test of that function.
> Presumably that sort of version testings is s plausible use case for a
> function's length although it isn't clear that it is any better than just
> putting a version tag property on such a function.
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss