Skip to content

Event handlers with invalid selectors should be caught at attach time #3071

Closed

Description

Image for: Description

Otherwise, they become very difficult to debug.

See this jsfiddle for an example. Attaching an event handler with an invalid selector div:not causes an exception to be raised at event time. This makes it very difficult to debug, as the trace of the error will usually only include jquery code.

I suggest jQuery should throw an exception at attach time instead, which makes it fairly easy to detect the faulty code.

Metadata

Image for: Metadata

Metadata

Image for: Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Image for: Issue actions