Skip to content

jQuery.isFunction: ambiguous criteria #1034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
akihikodaki opened this issue Apr 1, 2017 · 3 comments
Closed

jQuery.isFunction: ambiguous criteria #1034

akihikodaki opened this issue Apr 1, 2017 · 3 comments

Comments

@akihikodaki
Copy link

See also jquery/jquery#3600.

The description says:

Determine if the argument passed is a JavaScript function object.

<desc>Determine if the argument passed is a JavaScript function object. </desc>

JavaScript function object is ambiguous. There are some candidates:

  • ECMAScript Function Objects

ECMAScript function objects encapsulate parameterized ECMAScript code closed over a lexical environment and support the dynamic evaluation of that code.

  • Function Objects

The Function constructor is the %Function% intrinsic object and the initial value of the Function property of the global object.

  • function

member of the Object type that may be invoked as a subroutine

(ECMAScript 2016 Language Specification)

Neither of them matches the actual implementation; jQuery.isFunction tests @@toStringTag.

@AurelioDeRosa
Copy link
Member

@timmywil do you think it's worth clarifying considering that we have deprecated it?

@mgol
Copy link
Member

mgol commented Jan 30, 2018

Neither of them matches the actual implementation; jQuery.isFunction tests @@toStringTag.

That's no longer true in the latest jQuery (and, AFAIK, that has never been a purpose).

@AurelioDeRosa
Copy link
Member

Thanks for the answer @mgol. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants