Closed Bug 782190 Opened 12 years ago Closed 12 years ago

Implement onwheel attribute

Categories

(Core :: DOM: Events, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(2 files, 1 obsolete file)

D3E WheelEvent has been implemented already. However, there is no event attribute for it.

HTML5 draft doesn't define onwheel, but defines onmousewheel which is for the legacy mousewheel event (implemented on IE and WebKit). I think that we shouldn't use the name for wheel event and should be dropped from HTML5 spec.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=18542
Does IE have onwheel?

But anyhow, we should have it.
(In reply to Olli Pettay [:smaug] from comment #1)
> Does IE have onwheel?

IE9 doesn't support onwheel event. I don't know IE10. I don't have environment which has IE10.
you mean IE9 doesn't have onwheel property? It should support "wheel" event, I think.
At least they were claiming to implement all of D3E.
(In reply to Olli Pettay [:smaug] from comment #3)
> you mean IE9 doesn't have onwheel property?

Oops, I meant onwheel attribute isn't supported. E.g.,

<div style="overflow: auto; height: 100px; width: 100px;" onwheel="alert(event.type);">
<div style="height: 1000px; width: 1000px;" onwheel="alert(event.type);"></div>
</div>

In this case, these onwheel's script are not performed.
Attached patch Patch (obsolete) — Splinter Review
Attachment #651650 - Flags: review?(bugs)
Comment on attachment 651650 [details] [diff] [review]
Patch

I think we want also target.onwheel support, not only <element onwheel>
Attachment #651650 - Flags: review?(bugs) → review-
Ah, but I don't know where I need to change. Where should I change?
Yup, similarly to, hmm, I guess onclick for example.
You'll need to also use different macro in nsEventNameList.h
Attached patch PatchSplinter Review
Attachment #651650 - Attachment is obsolete: true
Attachment #652027 - Flags: review?(bugs)
Attachment #652027 - Flags: review?(bugs) → review+
Attachment #652027 - Flags: superreview?(jst)
Status: NEW → ASSIGNED
Attachment #652027 - Flags: superreview?(jst) → superreview+
https://hg.mozilla.org/mozilla-central/rev/90b4786131bd
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.