Fix MouseEvent.which to not throw

This commit is contained in:
David Zbarsky 2015-07-25 16:16:30 -04:00
parent 705c95dedb
commit 632b7f3c58
2 changed files with 3 additions and 4 deletions

View file

@ -160,11 +160,11 @@ impl<'a> MouseEventMethods for &'a MouseEvent {
// - https://github.com/servo/servo/issues/6643
// - https://bugzilla.mozilla.org/show_bug.cgi?id=1186125
// This returns the same result as current gecko.
fn GetWhich(self) -> Fallible<i32> {
fn Which(self) -> i32 {
if opts::experimental_enabled() {
Ok((self.button.get() + 1) as i32)
(self.button.get() + 1) as i32
} else {
Err(NotSupported)
0
}
}

View file

@ -20,7 +20,6 @@ interface MouseEvent : UIEvent {
//readonly attribute unsigned short buttons;
//boolean getModifierState (DOMString keyArg);
[Throws]
readonly attribute long which;
};