mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-26 02:52:35 +00:00 
			
		
		
		
	 acbdb95b0a
			
		
	
	
		acbdb95b0a
		
	
	
	
	
		
			
			This patch adds TreeWalker (created via Document.createTreeWalker()) which allows you to traverse a filtered view of the DOM in all directions.
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			443 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			443 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| #import <DOM/Node.idl>
 | |
| #import <DOM/NodeFilter.idl>
 | |
| 
 | |
| [Exposed=Window]
 | |
| interface TreeWalker {
 | |
| 
 | |
|     [SameObject] readonly attribute Node root;
 | |
|     readonly attribute unsigned long whatToShow;
 | |
|     readonly attribute NodeFilter? filter;
 | |
|     attribute Node currentNode;
 | |
| 
 | |
|     Node? parentNode();
 | |
|     Node? firstChild();
 | |
|     Node? lastChild();
 | |
|     Node? previousSibling();
 | |
|     Node? nextSibling();
 | |
|     Node? previousNode();
 | |
|     Node? nextNode();
 | |
| 
 | |
| };
 |