diff options
author | John DeSilva <desilvjo@umich.edu> | 2015-12-13 12:20:18 -0500 |
---|---|---|
committer | John DeSilva <desilvjo@umich.edu> | 2015-12-13 12:27:05 -0500 |
commit | f244a7075c2a296d725d7acad0c043cc002a7f0b (patch) | |
tree | bf0ca7e94394dc5f1265f480779e0121b55c9f5f /components/script/dom/webglcontextevent.rs | |
parent | e493a0655e69c1472a53708d213fd102decc59cb (diff) | |
download | servo-f244a7075c2a296d725d7acad0c043cc002a7f0b.tar.gz servo-f244a7075c2a296d725d7acad0c043cc002a7f0b.zip |
Make Event's isTrusted attribute unforgeable
Diffstat (limited to 'components/script/dom/webglcontextevent.rs')
-rw-r--r-- | components/script/dom/webglcontextevent.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/dom/webglcontextevent.rs b/components/script/dom/webglcontextevent.rs index 0cc353ef183..71ab79a34db 100644 --- a/components/script/dom/webglcontextevent.rs +++ b/components/script/dom/webglcontextevent.rs @@ -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::WebGLContextEventBinding; use dom::bindings::codegen::Bindings::WebGLContextEventBinding::WebGLContextEventInit; use dom::bindings::codegen::Bindings::WebGLContextEventBinding::WebGLContextEventMethods; @@ -25,6 +26,11 @@ impl WebGLContextEventMethods for WebGLContextEvent { fn StatusMessage(&self) -> DOMString { self.status_message.clone() } + + // https://dom.spec.whatwg.org/#dom-event-istrusted + fn IsTrusted(&self) -> bool { + self.event.IsTrusted() + } } impl WebGLContextEvent { |