Skip to content

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

@fsateler

Description

@fsateler

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions