mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Implement historical returnValue attribute for Event interface
This commit is contained in:
parent
427003210b
commit
fcadff7bad
6 changed files with 13 additions and 42 deletions
|
@ -297,6 +297,18 @@ impl EventMethods for Event {
|
|||
self.cancelable.get()
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-event-returnvalue
|
||||
fn ReturnValue(&self) -> bool {
|
||||
self.canceled.get() == EventDefault::Allowed
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-event-returnvalue
|
||||
fn SetReturnValue(&self, val: bool) {
|
||||
if !val {
|
||||
self.PreventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-event-timestamp
|
||||
fn TimeStamp(&self) -> u64 {
|
||||
self.timestamp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue