mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
auto merge of #666 : kmcallister/servo/htmldocument, r=jdm
This commit is contained in:
commit
a4baa7fc6b
1 changed files with 5 additions and 18 deletions
|
@ -80,15 +80,9 @@ impl HTMLDocument {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn Links(&self) -> @mut HTMLCollection {
|
pub fn Links(&self) -> @mut HTMLCollection {
|
||||||
self.createHTMLCollection(|elem| {
|
self.createHTMLCollection(|elem|
|
||||||
if eq_slice(elem.tag_name, "a") || eq_slice(elem.tag_name, "area") {
|
(eq_slice(elem.tag_name, "a") || eq_slice(elem.tag_name, "area"))
|
||||||
match elem.get_attr("href") {
|
&& elem.get_attr("href").is_some())
|
||||||
Some(_val) => true,
|
|
||||||
None() => false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else { false }
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn Forms(&self) -> @mut HTMLCollection {
|
pub fn Forms(&self) -> @mut HTMLCollection {
|
||||||
|
@ -169,15 +163,8 @@ impl HTMLDocument {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn Anchors(&self) -> @mut HTMLCollection {
|
pub fn Anchors(&self) -> @mut HTMLCollection {
|
||||||
self.createHTMLCollection(|elem| {
|
self.createHTMLCollection(|elem|
|
||||||
if eq_slice(elem.tag_name, "a") {
|
eq_slice(elem.tag_name, "a") && elem.get_attr("name").is_some())
|
||||||
match elem.get_attr("name") {
|
|
||||||
Some(_val) => true,
|
|
||||||
None() => false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else { false }
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn Applets(&self) -> @mut HTMLCollection {
|
pub fn Applets(&self) -> @mut HTMLCollection {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue