From 944d8b00b05c41a272f59eb8d24886ece8bcc95b Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Sun, 27 Jul 2014 20:22:13 +0200 Subject: Call the generated rather than the hand-written traits (fixes #2936). --- src/components/script/dom/window.rs | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'src/components/script/dom/window.rs') diff --git a/src/components/script/dom/window.rs b/src/components/script/dom/window.rs index e5f867c436b..e620a8c40b0 100644 --- a/src/components/script/dom/window.rs +++ b/src/components/script/dom/window.rs @@ -4,6 +4,7 @@ use dom::bindings::codegen::Bindings::EventHandlerBinding::{OnErrorEventHandlerNonNull, EventHandlerNonNull}; use dom::bindings::codegen::Bindings::WindowBinding; +use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use dom::bindings::codegen::InheritTypes::EventTargetCast; use dom::bindings::global; use dom::bindings::js::{JS, JSRef, Temporary, OptionalSettable}; @@ -119,33 +120,6 @@ pub struct TimerData { pub funval: Traceable, } -pub trait WindowMethods { - fn Alert(&self, s: DOMString); - fn Close(&self); - fn Document(&self) -> Temporary; - fn Location(&self) -> Temporary; - fn Console(&self) -> Temporary; - fn Navigator(&self) -> Temporary; - fn SetTimeout(&self, _cx: *mut JSContext, callback: JSVal, timeout: i32) -> i32; - fn ClearTimeout(&self, handle: i32); - fn SetInterval(&self, _cx: *mut JSContext, callback: JSVal, timeout: i32) -> i32; - fn ClearInterval(&self, handle: i32); - fn Window(&self) -> Temporary; - fn Self(&self) -> Temporary; - fn Performance(&self) -> Temporary; - fn GetOnclick(&self) -> Option; - fn SetOnclick(&self, listener: Option); - fn GetOnload(&self) -> Option; - fn SetOnload(&self, listener: Option); - fn GetOnunload(&self) -> Option; - fn SetOnunload(&self, listener: Option); - fn GetOnerror(&self) -> Option; - fn SetOnerror(&self, listener: Option); - fn Screen(&self) -> Temporary; - fn Debug(&self, message: DOMString); - fn Gc(&self); -} - impl<'a> WindowMethods for JSRef<'a, Window> { fn Alert(&self, s: DOMString) { // Right now, just print to the console -- cgit v1.2.3