Bug 1842773 - Part 5: Add ArrayBuffer.prototype.{maxByteLength,resizable} getters...
[gecko.git] / dom / base / nsIScriptableContentIterator.idl
blobcaf689f550b80a74867636ea9e5b4556696c4504
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 webidl Node;
9 webidl Range;
11 /**
12 * nsIScriptableContentIterator is designed to testing concrete classes of
13 * ContentIteratorBase.
15 [scriptable, builtinclass, uuid(9f25fb2a-265f-44f9-a122-62bbf443239e)]
16 interface nsIScriptableContentIterator : nsISupports
18 cenum IteratorType : 8 {
19 NOT_INITIALIZED,
20 POST_ORDER_ITERATOR,
21 PRE_ORDER_ITERATOR,
22 SUBTREE_ITERATOR
25 /**
26 * You need to call initWith*() first. Then, the instance of this interface
27 * decides the type of iterator with its aType argument. You can call
28 * initWith*() multiple times, but you need to keep setting same type as
29 * previous call. If you set different type, these method with throw an
30 * exception.
33 // See ContentIteratorBase::Init(nsINode*)
34 void initWithRootNode(in nsIScriptableContentIterator_IteratorType aType,
35 in Node aRoot);
37 // See ContentIteratorBase::Init(nsRange*)
38 void initWithRange(in nsIScriptableContentIterator_IteratorType aType,
39 in Range aRange);
41 // See ContentIteratorBase::Init(nsINode*, uint32_t, nsINode*, uint32_t)
42 void initWithPositions(in nsIScriptableContentIterator_IteratorType aType,
43 in Node aStartContainer, in unsigned long aStartOffset,
44 in Node aEndContainer, in unsigned long aEndOffset);
46 // See ContentIteratorBase::First()
47 void first();
49 // See ContentIteratorBase::Last()
50 void last();
52 // See ContentIteratorBase::Next()
53 void next();
55 // See ContentIteratorBase::Prev()
56 void prev();
58 // See ContentIteratorBase::GetCurrentNode()
59 readonly attribute Node currentNode;
61 // See ContentIteratorBase::IsDone()
62 readonly attribute bool isDone;
64 // See ContentIteratorBase::PositionAt(nsINode*)
65 void positionAt(in Node aNode);
68 %{C++
69 #define SCRIPTABLE_CONTENT_ITERATOR_CID \
70 { 0xf68037ec, 0x2790, 0x44c5, \
71 { 0x8e, 0x5f, 0xdf, 0x5d, 0xa5, 0x8b, 0x93, 0xa7 } }
72 #define SCRIPTABLE_CONTENT_ITERATOR_CONTRACTID \
73 "@mozilla.org/scriptable-content-iterator;1"