DocScripts, // all <script> elements
DocAll, // "all" elements (IE)
- // Named collection types cached in the document.
- WindowNamedItems,
- DocumentNamedItems,
-
// Unnamed HTMLCollection types cached in elements.
NodeChildren, // first-level children (ParentNode DOM interface)
TableTBodies, // all <tbody> elements in this table
MapAreas,
FormControls,
+ // Named HTMLCollection types cached in the document.
+ WindowNamedItems,
+ DocumentNamedItems,
+
+ // Named HTMLCollection types cached in elements.
ClassCollectionType,
TagCollectionType,
HTMLTagCollectionType,
LabelsNodeListType,
};
+static const CollectionType FirstNamedCollectionType = WindowNamedItems;
static const CollectionType FirstLiveNodeListType = NameNodeListType;
+inline bool isUnnamedHTMLCollectionType(CollectionType type)
+{
+ return type < FirstNamedCollectionType;
+}
+
+inline bool isHTMLCollectionType(CollectionType type)
+{
+ return type < FirstLiveNodeListType;
+}
+
inline bool isLiveNodeListType(CollectionType type)
{
return type >= FirstLiveNodeListType;