mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Call the generated rather than the hand-written traits (fixes #2936).
This commit is contained in:
parent
38a658d561
commit
944d8b00b0
116 changed files with 126 additions and 765 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::Bindings::EventBinding;
|
||||
use dom::bindings::codegen::Bindings::EventBinding::EventConstants;
|
||||
use dom::bindings::codegen::Bindings::EventBinding::{EventConstants, EventMethods};
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{JS, JSRef, Temporary};
|
||||
|
@ -108,22 +108,6 @@ impl Event {
|
|||
}
|
||||
}
|
||||
|
||||
pub trait EventMethods {
|
||||
fn EventPhase(&self) -> u16;
|
||||
fn Type(&self) -> DOMString;
|
||||
fn GetTarget(&self) -> Option<Temporary<EventTarget>>;
|
||||
fn GetCurrentTarget(&self) -> Option<Temporary<EventTarget>>;
|
||||
fn DefaultPrevented(&self) -> bool;
|
||||
fn PreventDefault(&self);
|
||||
fn StopPropagation(&self);
|
||||
fn StopImmediatePropagation(&self);
|
||||
fn Bubbles(&self) -> bool;
|
||||
fn Cancelable(&self) -> bool;
|
||||
fn TimeStamp(&self) -> u64;
|
||||
fn InitEvent(&self, type_: DOMString, bubbles: bool, cancelable: bool);
|
||||
fn IsTrusted(&self) -> bool;
|
||||
}
|
||||
|
||||
impl<'a> EventMethods for JSRef<'a, Event> {
|
||||
fn EventPhase(&self) -> u16 {
|
||||
self.phase.deref().get() as u16
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue