mirror of
https://github.com/servo/servo.git
synced 2025-07-24 07:40:27 +01:00
Implement Document.createNodeIterator and rebase patch
This commit is contained in:
parent
0e4c792dc5
commit
4e8005cd5b
3 changed files with 14 additions and 9 deletions
|
@ -58,6 +58,7 @@ use dom::keyboardevent::KeyboardEvent;
|
|||
use dom::messageevent::MessageEvent;
|
||||
use dom::node::{self, Node, NodeHelpers, NodeTypeId, CloneChildrenFlag, NodeDamage, window_from_node};
|
||||
use dom::nodelist::NodeList;
|
||||
use dom::nodeiterator::NodeIterator;
|
||||
use dom::text::Text;
|
||||
use dom::processinginstruction::ProcessingInstruction;
|
||||
use dom::range::Range;
|
||||
|
@ -1363,6 +1364,12 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
|
|||
Range::new_with_doc(self)
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-document-createnodeiterator
|
||||
fn CreateNodeIterator(self, root: JSRef<Node>, whatToShow: u32, filter: Option<NodeFilter>)
|
||||
-> Temporary<NodeIterator> {
|
||||
NodeIterator::new(self, root, whatToShow, filter)
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-document-createtreewalker
|
||||
fn CreateTreeWalker(self, root: JSRef<Node>, whatToShow: u32, filter: Option<NodeFilter>)
|
||||
-> Temporary<TreeWalker> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue