Skip to content

jQuery.isFunction: ambiguous criteria #1034

Closed
@akihikodaki

Description

@akihikodaki

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions