The default bug view has changed. See this FAQ.

Add defaultPrevented to nsIDOMEvent

RESOLVED FIXED in mozilla6

Status

()

Core
DOM: Events
RESOLVED FIXED
6 years ago
3 years ago

People

(Reporter: smaug, Assigned: smaug)

Tracking

({dev-doc-complete})

unspecified
mozilla6
x86
All
dev-doc-complete
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

We have non-standard getPreventDefault() in nsIDOMNSEvent, but we should
deprecate that at some point and start using defaultPrevented.
But first, implement defaultPrevented.
Created attachment 532339 [details] [diff] [review]
patch
Attachment #532339 - Flags: review?(jonas)
Attachment #532339 - Flags: review?(jonas) → review+
http://hg.mozilla.org/mozilla-central/rev/932a10564fbc
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Comment 3

6 years ago
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_" ? ;)
yes!
I'll fix that.
http://hg.mozilla.org/mozilla-central/rev/5a47fba510f3
Keywords: dev-doc-needed
Assignee: nobody → Olli.Pettay
Flags: in-testsuite+
Target Milestone: --- → mozilla6
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.
Keywords: dev-doc-needed → dev-doc-complete

Updated

4 years ago
Blocks: 714601
You need to log in before you can comment on or make changes to this bug.