Make Event's isTrusted attribute unforgeable

This commit is contained in:
John DeSilva 2015-12-13 12:20:18 -05:00
parent e493a0655e
commit f244a7075c
13 changed files with 63 additions and 8 deletions

View file

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
use dom::bindings::codegen::Bindings::StorageEventBinding;
use dom::bindings::codegen::Bindings::StorageEventBinding::{StorageEventMethods};
use dom::bindings::error::Fallible;
@ -108,4 +109,9 @@ impl StorageEventMethods for StorageEvent {
fn GetStorageArea(&self) -> Option<Root<Storage>> {
self.storageArea.get()
}
// https://dom.spec.whatwg.org/#dom-event-istrusted
fn IsTrusted(&self) -> bool {
self.event.IsTrusted()
}
}