1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include
"nsISupports.idl"
9 // Note: the iterator does not handle DOM mutations gracefully. So if
10 // the underlying DOM we are iterating over is changed, the behavior
11 // of the walker is undefined. (With the current implementation we
12 // cache the siblings of the current node and this list is not updated
13 // when a mutation occurs).
15 [scriptable
, uuid(6657e8eb
-b646
-48e7
-993e
-cfa6e96415b4
)]
16 interface inIDeepTreeWalker
: nsISupports
18 attribute
boolean showAnonymousContent
;
19 attribute
boolean showSubDocuments
;
21 // By default the walker skips document nodes from the iteration,
22 // by setting this flag to true this behavior can be altered.
23 attribute
boolean showDocumentsAsNodes
;
25 void init
(in Node aRoot
);
27 // Methods and attributes that look like TreeWalker.
28 // Note: normally parentNode cannot go further up on the tree once it reached
29 // the root, but setting currentNode does not have this limitation. If currentNode
30 // is set to a node that does not have the root as its ancestor the walk can be
31 // continued from there, and once we reach a node that is 'under' the root, the
32 // limitation for the parentNode will work again.
33 readonly attribute Node root
;
34 attribute Node currentNode
;
39 Node previousSibling
();