Open Bug 106221 Opened 24 years ago Updated 3 years ago

Deprecate use of setAttribute for event handlers

Categories

(Core :: XUL, enhancement)

x86
Windows 95
enhancement

Tracking

()

Future

People

(Reporter: neil, Unassigned)

Details

Although setAttribute can be used to dynamically add event handlers to XUL elements there is no obvious way to remove such a handler (removeAttribute doesn't seem to work, see comment in editor.js) and when the handler is already a JS function this wastes an extra compile. IMHO this use of setAttribute should be deprecated in favour of addEventListener (with the advantage of having removeEventListener).
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0.1
--> default owner
Assignee: hyatt → jaggernaut
Status: ASSIGNED → NEW
Target Milestone: mozilla1.0.1 → ---
Is there anything specifically to be done, code-wise, for this bug? Or is this a request for hyatt (now jag) to admonish developers with an official "Don't Do That!". :-)
Target Milestone: --- → Future
I'll settle for an admonishment from anyone that developers are prepared to listen to, although I would prefer to remove any existing examples.
Got a patch? This should already be on (super-)reviewers' don't do that lists.
Assignee: jag → nobody
QA Contact: jrgmorrison → xptoolkit.widgets
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.