mirror of
https://github.com/servo/servo.git
synced 2025-06-18 05:14:28 +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
|
@ -4,6 +4,7 @@
|
|||
|
||||
use dom::attr::Attr;
|
||||
use dom::bindings::codegen::Bindings::AttrListBinding;
|
||||
use dom::bindings::codegen::Bindings::AttrListBinding::AttrListMethods;
|
||||
use dom::bindings::global::Window;
|
||||
use dom::bindings::js::{JS, JSRef, Temporary};
|
||||
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||
|
@ -30,12 +31,6 @@ impl AttrList {
|
|||
}
|
||||
}
|
||||
|
||||
pub trait AttrListMethods {
|
||||
fn Length(&self) -> u32;
|
||||
fn Item(&self, index: u32) -> Option<Temporary<Attr>>;
|
||||
fn IndexedGetter(&self, index: u32, found: &mut bool) -> Option<Temporary<Attr>>;
|
||||
}
|
||||
|
||||
impl<'a> AttrListMethods for JSRef<'a, AttrList> {
|
||||
fn Length(&self) -> u32 {
|
||||
self.owner.root().attrs.borrow().len() as u32
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue