mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Implement Node.contains
Spec: http://dom.spec.whatwg.org/#dom-node-contains Closes #1647.
This commit is contained in:
parent
9305a95b68
commit
99b3b144d4
4 changed files with 33 additions and 4 deletions
|
@ -1538,8 +1538,11 @@ impl Node {
|
|||
0
|
||||
}
|
||||
|
||||
pub fn Contains(&self, _other: Option<AbstractNode>) -> bool {
|
||||
false
|
||||
pub fn Contains(&self, abstract_self: AbstractNode, maybe_other: Option<AbstractNode>) -> bool {
|
||||
match maybe_other {
|
||||
None => false,
|
||||
Some(other) => abstract_self.is_inclusive_ancestor_of(other)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn LookupPrefix(&self, _prefix: Option<DOMString>) -> Option<DOMString> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue