Skip to main content

Bug Tracker

Side navigation

#13867 closed feature (wontfix)

Opened May 07, 2013 08:08PM UTC

Closed May 07, 2013 08:40PM UTC

Last modified May 07, 2013 08:42PM UTC

Return jquery.Event for chaining

Reported by: anonymous Owned by:
Priority: undecided Milestone: None
Component: unfiled Version:
Keywords: Cc:
Blocked by: Blocking:
Description

I think it would be nice for e.stopPropagation, e.stopImmediatePropagation and e.preventDefault to return the jQuery event object for chaining, I have checked and they currently do not return, so a return this statement should do the job. Then I can call:

e.preventDefault().stopPropagation();

Attachments (0)
Change History (3)

Changed May 07, 2013 08:37PM UTC by anonymous comment:1

Changed May 07, 2013 08:40PM UTC by rwaldron comment:2

resolution: → wontfix
status: newclosed

Thanks but jQuery is not accepting new features at this time.

Changed May 07, 2013 08:42PM UTC by dmethvin comment:3

See the standard, those methods are void: http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface

Changing our event to do something different than the standard would be a really bad idea. There could be times in the future when we want to pass a native unnormalized event and adopting these semantics would prevent i