Implementation:SeleniumHQ Selenium Closure Array
| Knowledge Sources | |
|---|---|
| Domains | JavaScript_Atoms, Vendored_Library |
| Last Updated | 2026-02-12 00:00 GMT |
Overview
Vendored Google Closure Library module providing array manipulation utilities used by Selenium JavaScript atoms.
Description
goog.array is a vendored copy of the Google Closure Library module. It provides a comprehensive set of utilities for manipulating arrays, including searching, iterating, filtering, mapping, reducing, sorting, and modifying arrays. The module can optionally delegate to native Array.prototype methods when available. 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/array/array.js
- Lines: 1-1783
Key Exports
goog.module('goog.array');
// Key exported functions:
exports.peek(array)
exports.last(array)
exports.indexOf(arr, obj, opt_fromIndex)
exports.lastIndexOf(arr, obj, opt_fromIndex)
exports.forEach(arr, f, opt_obj)
exports.forEachRight(arr, f, opt_obj)
exports.filter(arr, f, opt_obj)
exports.map(arr, f, opt_obj)
exports.reduce(arr, f, val, opt_obj)
exports.reduceRight(arr, f, val, opt_obj)
exports.some(arr, f, opt_obj)
exports.every(arr, f, opt_obj)
exports.count(arr, f, opt_obj)
exports.find(arr, f, opt_obj)
exports.findIndex(arr, f, opt_obj)
exports.contains(arr, obj)
exports.isEmpty(arr)