Closed Bug 993329 Opened 7 years ago Closed 7 years ago

Remove inline event handlers in newTab.xul

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 31

People

(Reporter: ttaubert, Assigned: mzhilyaev)

References

(Blocks 1 open bug, )

Details

(Whiteboard: p=2 s=it-31c-30a-29b.2 [qa-])

Attachments

(1 file)

When landing bug 974745 we introduced inline event handlers to newTab.xul, which we really shouldn't use anymore because they're bad style. Please always use .addEventListener() etc. for event handling.
Flags: firefox-backlog?
I don't follow.

By inline event handlers you mean

  addEventListener(event, event => {});

instead of

  addEventListener(event, this);
  ...
  handleEvent: function (event) {}?

Why is that bad style?

Re: always using .addEventListener() for event handling, what other than addEventListener do you use to handle events?
Flags: needinfo?(ttaubert)
No, I was talking about onclick="foo.bar()" or onsubmit="foo.baz()". Inline like in "inline styles", not sure if that's the correct term.
Flags: needinfo?(ttaubert)
Gotcha, thanks.
Assignee: nobody → mzhilyaev
Flags: firefox-backlog? → firefox-backlog+
Attached patch v1Splinter Review
Attachment #8405078 - Flags: review?(adw)
Attachment #8405078 - Flags: review?(adw) → review+
https://hg.mozilla.org/integration/fx-team/rev/040440348215

qa- for already covered by automated tests
Whiteboard: p=2 → p=2 s=it-31c-30a-29b.2 [qa-]
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/040440348215
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 31
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.