#13867 closed feature (wontfix)
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();
Change History (3)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Thanks but jQuery is not accepting new features at this time.
comment:3 Changed 10 years ago by
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
https://github.com/jquery/jquery/pull/1262