mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
Make Event's isTrusted attribute unforgeable
This commit is contained in:
parent
e493a0655e
commit
f244a7075c
13 changed files with 63 additions and 8 deletions
|
@ -5,6 +5,7 @@
|
|||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::ErrorEventBinding;
|
||||
use dom::bindings::codegen::Bindings::ErrorEventBinding::ErrorEventMethods;
|
||||
use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
|
@ -134,4 +135,8 @@ impl ErrorEventMethods for ErrorEvent {
|
|||
self.error.get()
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-event-istrusted
|
||||
fn IsTrusted(&self) -> bool {
|
||||
self.event.IsTrusted()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue