mirror of
https://github.com/servo/servo.git
synced 2025-06-15 03:44:30 +00: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,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::Bindings::ConsoleBinding;
|
||||
use dom::bindings::codegen::Bindings::ConsoleBinding::ConsoleMethods;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{JSRef, Temporary};
|
||||
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||
|
@ -25,15 +26,6 @@ impl Console {
|
|||
}
|
||||
}
|
||||
|
||||
pub trait ConsoleMethods {
|
||||
fn Log(&self, message: DOMString);
|
||||
fn Debug(&self, message: DOMString);
|
||||
fn Info(&self, message: DOMString);
|
||||
fn Warn(&self, message: DOMString);
|
||||
fn Error(&self, message: DOMString);
|
||||
fn Assert(&self, condition: bool, message: Option<DOMString>);
|
||||
}
|
||||
|
||||
impl<'a> ConsoleMethods for JSRef<'a, Console> {
|
||||
fn Log(&self, message: DOMString) {
|
||||
println!("{:s}", message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue