length property value for functions with parameter enhancements
Rick Waldron
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
Rick
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.
>
> Allen
>
>
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110901/fcbd13a5/attachment.html>
More information about the es-discuss
mailing list