Implementation:SeleniumHQ Selenium Closure Dom
| Knowledge Sources | |
|---|---|
| Domains | JavaScript_Atoms, Vendored_Library |
| Last Updated | 2026-02-12 00:00 GMT |
Overview
Vendored Google Closure Library module providing DOM manipulation utilities used by Selenium JavaScript atoms.
Description
goog.dom is a vendored copy of the Google Closure Library module. It provides comprehensive utilities for manipulating the browser's Document Object Model, inspired by MochiKit. Features include element lookup by ID/tag/class, DOM tree creation and manipulation, text content handling, document/window queries, and a DomHelper class for working with multiple documents (e.g., frames). 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
- Repository: SeleniumHQ_Selenium
- File: third_party/closure/goog/dom/dom.js
- Lines: 1-3492
Key Exports
goog.provide('goog.dom');
goog.provide('goog.dom.Appendable');
goog.provide('goog.dom.DomHelper');
// Key exported functions:
goog.dom.getDomHelper(opt_element)
goog.dom.getDocument()
goog.dom.getElement(element)
goog.dom.getRequiredElement(id)
goog.dom.getElementsByTagName(tagName, opt_parent)
goog.dom.getElementsByTagNameAndClass(opt_tag, opt_class, opt_el)
goog.dom.getElementsByClass(className, opt_el)
goog.dom.getElementByClass(className, opt_el)
goog.dom.setProperties(element, properties)