Closed Bug 691151 Opened 8 years ago Closed 2 years ago
.prototype .get Prevent Default
This is not standard and has a standard alternative (defaultPrevented property). There is no reason to keep this around forever.
Need to first remove all its usage from Firefox / Gecko / Thunderbird / etc. then start warn about its usage, and then remove it. But yes, we should try to remove it.
Looks like that wouldn't be too hard: <http://mxr.mozilla.org/comm-central/search?string=getPreventDefault&filter=\bgetPreventDefault>.
(In reply to Olli Pettay from comment #1) > Need to first remove all its usage from Firefox / Gecko / Thunderbird / etc. > then start warn about its usage, and then remove it. > But yes, we should try to remove it. Looks like we started warning about it when there are still 11 in-tree callers...
Oops, I didn't realize the existence of C++ callers. Reverting for now.
It appears that wikipedia still uses this.
Posted the site compatibility doc: https://www.fxsitecompat.com/en-US/docs/2015/event-getpreventdefault-will-be-removed/
Are there any estimates on when getPreventDefault will finally be removed?
Olli, thoughts on removing this? Telemetry is moderately useless, because some old jQuery versions have: this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; which will call the method any for any event for which default is _not_ prevented. That said, no one else implements this, and it feels somewhat safe to try removing...
I guess we could try to remove this early in a cycle. So, next week?
Attachment #8928179 - Flags: review?(bugs)
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/3b3a7055f264 Remove Event.getPreventDefault. r=smaug
Posted the site compatibility note: https://www.fxsitecompat.com/en-CA/docs/2017/event-getpreventdefault-has-been-removed/
Updated Firefox 59 for developers. This method was never documented; its only mention is a note on defaultPrevented that you shouldn't use getPreventdefault().
Was DEPRECATED_OPERATION(GetPreventDefault) forgotten? https://dxr.mozilla.org/mozilla-central/rev/e22e2c9eb81686e958a9448ea3d1e8cd766743e2/dom/base/nsDeprecatedOperationList.h#20
So it seems. Wanna fix?
Sure. Filed bug 1433404.
You need to log in before you can comment on or make changes to this bug.