mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fix getElementsByTagName[NS] support to match the spec.
This commit is contained in:
parent
70e70fd1d9
commit
0b802ab018
5 changed files with 65 additions and 22 deletions
|
@ -389,6 +389,7 @@ pub trait NodeHelpers {
|
|||
|
||||
fn owner_doc(&self) -> Temporary<Document>;
|
||||
fn set_owner_doc(&self, document: &JSRef<Document>);
|
||||
fn is_in_html_doc(&self) -> bool;
|
||||
|
||||
fn wait_until_safe_to_modify_dom(&self);
|
||||
|
||||
|
@ -672,6 +673,10 @@ impl<'a> NodeHelpers for JSRef<'a, Node> {
|
|||
self.owner_doc.assign(Some(document.clone()));
|
||||
}
|
||||
|
||||
fn is_in_html_doc(&self) -> bool {
|
||||
self.owner_doc().root().is_html_document
|
||||
}
|
||||
|
||||
fn children(&self) -> AbstractNodeChildrenIterator {
|
||||
AbstractNodeChildrenIterator {
|
||||
current_node: self.first_child.get().map(|node| (*node.root()).clone()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue