mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04:33 +01:00
Implemented {Document,Element}.getElementsByClassName
This commit is contained in:
parent
e1499b610e
commit
d010861b75
5 changed files with 24 additions and 4 deletions
|
@ -225,6 +225,11 @@ impl Document {
|
|||
HTMLCollection::by_tag_name_ns(&self.window, &NodeCast::from(abstract_self), tag_name, namespace)
|
||||
}
|
||||
|
||||
// http://dom.spec.whatwg.org/#dom-document-getelementsbyclassname
|
||||
pub fn GetElementsByClassName(&self, abstract_self: &JS<Document>, classes: DOMString) -> JS<HTMLCollection> {
|
||||
HTMLCollection::by_class_name(&self.window, &NodeCast::from(abstract_self), classes)
|
||||
}
|
||||
|
||||
// http://dom.spec.whatwg.org/#dom-nonelementparentnode-getelementbyid
|
||||
pub fn GetElementById(&self, id: DOMString) -> Option<JS<Element>> {
|
||||
// TODO: "in tree order, within the context object's tree"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue