Open
Bug 719616
Opened 13 years ago
Updated 3 years ago
Display warning in the error console when handlers like onclick, onmousedown etc. get passed something else than a function
Categories
(Core :: DOM: Events, enhancement, P5)
Core
DOM: Events
Tracking
()
NEW
People
(Reporter: Tobbi, Unassigned)
Details
Now, this is something I encountered while debugging a script from another guy (JavaScript beginner). This is what he wrote:
document.getElementsByTagName('input')[0].onclick='displayPage2()'.
You can clearly see that this is not a function call, but a string containing the function call gets passed to onclick. The problem is that this fails silently, no errors in the error console get shown.
Would it be possible to display a small warning in the error console that states that there was something else than a function passed to an on... handler? It would ease learning JS for beginners.
Reporter | ||
Updated•13 years ago
|
Assignee: general → nobody
Component: JavaScript Engine → DOM: Events
QA Contact: general → events
Comment 1•7 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•