mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -841,4 +841,9 @@ impl KeyboardEventMethods for KeyboardEvent {
|
|||
fn Which(&self) -> u32 {
|
||||
self.char_code.get().unwrap_or(self.KeyCode())
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-event-istrusted
|
||||
fn IsTrusted(&self) -> bool {
|
||||
self.uievent.IsTrusted()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue