Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:SeleniumHQ Selenium Closure Dom TagIterator

From Leeroopedia
Knowledge Sources
Domains JavaScript_Atoms, Vendored_Library
Last Updated 2026-02-12 00:00 GMT

Overview

Vendored Google Closure Library module providing a DOM tree traversal iterator used by Selenium JavaScript atoms.

Description

goog.dom.TagIterator is a vendored copy of the Google Closure Library module. It provides an iterator subclass for DOM tree traversal that walks the DOM in order, reporting events for the start and end of Elements and the presence of text nodes. It defines TagWalkType (START_TAG, OTHER, END_TAG) to classify each position in the traversal. The iterator supports forward and reverse traversal, constrained and unconstrained modes, and tracks traversal depth. Selenium uses this as part of its JavaScript atom infrastructure for browser automation commands.

Usage

This module is consumed internally by Selenium's JavaScript atoms build system. It is not imported directly by end users.

Code Reference

Source Location

Key Exports

goog.provide('goog.dom.TagIterator');
goog.provide('goog.dom.TagWalkType');

// TagWalkType enum:
goog.dom.TagWalkType = {
  START_TAG: 1,
  OTHER: 0,
  END_TAG: -1
};

// TagIterator constructor:
goog.dom.TagIterator(opt_node, opt_reversed, opt_unconstrained, opt_tagType, opt_depth)
// Extends goog.iter.Iterator

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment