mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix MouseEvent.which to not throw
This commit is contained in:
parent
705c95dedb
commit
632b7f3c58
2 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ interface MouseEvent : UIEvent {
|
|||
//readonly attribute unsigned short buttons;
|
||||
//boolean getModifierState (DOMString keyArg);
|
||||
|
||||
[Throws]
|
||||
readonly attribute long which;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue