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"
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 {
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
33 // See ContentIteratorBase::Init(nsINode*)
34 void initWithRootNode
(in nsIScriptableContentIterator_IteratorType aType
,
37 // See ContentIteratorBase::Init(nsRange*)
38 void initWithRange
(in nsIScriptableContentIterator_IteratorType aType
,
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()
49 // See ContentIteratorBase::Last()
52 // See ContentIteratorBase::Next()
55 // See ContentIteratorBase::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
);
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"