Skip to content

Better error message when using a non-function as an event handler #15411

@PatrickG

Description

@PatrickG

Describe the problem

When you accidently use a non-function as an event handler, the error message is not very helpful.

chunk-Q366ZBYL.js?v=5d387fed:2931 Uncaught TypeError: delegated.call is not a function
    at HTMLDivElement.handle_event_propagation

Originating from here.

REPL

Describe the proposed solution

Throw an error with a better error message if delegated is not a function. At least in dev mode.

Importance

nice to have

Metadata

Metadata

Assignees

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