Last Comment Bug 656954 - Add defaultPrevented to nsIDOMEvent
: Add defaultPrevented to nsIDOMEvent
Status: RESOLVED FIXED
: dev-doc-complete
Product: Core
Classification: Components
Component: DOM: Events (show other bugs)
: unspecified
: x86 All
: -- normal (vote)
: mozilla6
Assigned To: Olli Pettay [:smaug]
:
Mentors:
Depends on:
Blocks: 714601
  Show dependency treegraph
 
Reported: 2011-05-13 10:40 PDT by Olli Pettay [:smaug]
Modified: 2013-11-12 00:56 PST (History)
3 users (show)
khuey: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (5.02 KB, patch)
2011-05-13 13:47 PDT, Olli Pettay [:smaug]
jonas: review+
Details | Diff | Splinter Review

Description Olli Pettay [:smaug] 2011-05-13 10:40:24 PDT
We have non-standard getPreventDefault() in nsIDOMNSEvent, but we should
deprecate that at some point and start using defaultPrevented.
But first, implement defaultPrevented.
Comment 1 Olli Pettay [:smaug] 2011-05-13 13:47:36 PDT
Created attachment 532339 [details] [diff] [review]
patch
Comment 2 Olli Pettay [:smaug] 2011-05-14 01:45:39 PDT
http://hg.mozilla.org/mozilla-central/rev/932a10564fbc
Comment 3 Frank Yan (:fryn) 2011-05-14 03:50:40 PDT
Comment on attachment 532339 [details] [diff] [review]
patch

(just took a look at the changeset on m-c out of curiosity)

> +is(e.defaultPrevented, false,
> +   "After creating event defaultPrevented should be true");

Was the second line supposed to be "After creating event defaultPrevented should be _false_" ? ;)
Comment 4 Olli Pettay [:smaug] 2011-05-14 04:07:04 PDT
yes!
I'll fix that.
Comment 5 Olli Pettay [:smaug] 2011-05-14 07:02:31 PDT
http://hg.mozilla.org/mozilla-central/rev/5a47fba510f3
Comment 6 Eric Shepherd [:sheppy] 2011-05-16 16:27:04 PDT
Documentation added:
https://developer.mozilla.org/en/DOM/event.defaultPrevented

Updated:

https://developer.mozilla.org/en/DOM/event.preventDefault
https://developer.mozilla.org/en/DOM/event

Mentioned on Firefox 6 for developers.

Note You need to log in before you can comment on or make changes to this bug.