aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/htmlcollection.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/htmlcollection.rs')
-rw-r--r--src/components/script/dom/htmlcollection.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/components/script/dom/htmlcollection.rs b/src/components/script/dom/htmlcollection.rs
index 65a617a10f6..42712cf50b4 100644
--- a/src/components/script/dom/htmlcollection.rs
+++ b/src/components/script/dom/htmlcollection.rs
@@ -2,8 +2,9 @@
* 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::InheritTypes::{ElementCast, NodeCast};
use dom::bindings::codegen::Bindings::HTMLCollectionBinding;
+use dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
+use dom::bindings::codegen::InheritTypes::{ElementCast, NodeCast};
use dom::bindings::global::Window;
use dom::bindings::js::{JS, JSRef, Temporary};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
@@ -119,14 +120,6 @@ impl HTMLCollection {
}
}
-pub trait HTMLCollectionMethods {
- fn Length(&self) -> u32;
- fn Item(&self, index: u32) -> Option<Temporary<Element>>;
- fn NamedItem(&self, key: DOMString) -> Option<Temporary<Element>>;
- fn IndexedGetter(&self, index: u32, found: &mut bool) -> Option<Temporary<Element>>;
- fn NamedGetter(&self, name: DOMString, found: &mut bool) -> Option<Temporary<Element>>;
-}
-
impl<'a> HTMLCollectionMethods for JSRef<'a, HTMLCollection> {
// http://dom.spec.whatwg.org/#dom-htmlcollection-length
fn Length(&self) -> u32 {