mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Implement TreeWalker
This commit is contained in:
parent
5e5f77a354
commit
92638a6fe6
10 changed files with 603 additions and 71 deletions
|
@ -45,6 +45,12 @@ interface Document : Node {
|
|||
Event createEvent(DOMString interface_);
|
||||
|
||||
Range createRange();
|
||||
|
||||
// NodeFilter.SHOW_ALL = 0xFFFFFFFF
|
||||
// [NewObject]
|
||||
// NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
|
||||
[NewObject]
|
||||
TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
|
||||
};
|
||||
|
||||
/* http://www.whatwg.org/specs/web-apps/current-work/#the-document-object */
|
||||
|
|
|
@ -8,16 +8,27 @@
|
|||
*/
|
||||
|
||||
interface TreeWalker {
|
||||
// [SameObject] readonly attribute Node root;
|
||||
// readonly attribute unsigned long whatToShow;
|
||||
// readonly attribute NodeFilter? filter;
|
||||
// attribute Node currentNode;
|
||||
[SameObject,Constant]
|
||||
readonly attribute Node root;
|
||||
[Constant]
|
||||
readonly attribute unsigned long whatToShow;
|
||||
[Constant]
|
||||
readonly attribute NodeFilter? filter;
|
||||
[Pure, SetterThrows]
|
||||
attribute Node currentNode;
|
||||
|
||||
// Node? parentNode();
|
||||
// Node? firstChild();
|
||||
// Node? lastChild();
|
||||
// Node? previousSibling();
|
||||
// Node? nextSibling();
|
||||
// Node? previousNode();
|
||||
// Node? nextNode();
|
||||
[Throws]
|
||||
Node? parentNode();
|
||||
[Throws]
|
||||
Node? firstChild();
|
||||
[Throws]
|
||||
Node? lastChild();
|
||||
[Throws]
|
||||
Node? previousSibling();
|
||||
[Throws]
|
||||
Node? nextSibling();
|
||||
[Throws]
|
||||
Node? previousNode();
|
||||
[Throws]
|
||||
Node? nextNode();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue