Implementation:SeleniumHQ Selenium Closure Math Rect
| Knowledge Sources | |
|---|---|
| Domains | JavaScript_Atoms, Vendored_Library |
| Last Updated | 2026-02-12 00:00 GMT |
Overview
Vendored Google Closure Library module providing a rectangle utility class used by Selenium JavaScript atoms.
Description
goog.math.Rect is a vendored copy of the Google Closure Library module. It provides a class for representing rectangular regions defined by position (x, y) and dimensions (width, height). It implements goog.math.IRect and includes methods for cloning, conversion to Box, creation from position and size, and intersection/containment checks. Selenium uses this as part of its JavaScript atom infrastructure.
Usage
This module is consumed internally by Selenium's JavaScript atoms build system. Not imported directly by end users.
Code Reference
Source Location
- Repository: SeleniumHQ_Selenium
- File: third_party/closure/goog/math/rect.js
- Lines: 1-496
Key Exports
goog.provide('goog.math.Rect');
goog.math.Rect = function(x, y, w, h) { ... };
goog.math.Rect.prototype.clone = function() { ... };
goog.math.Rect.prototype.toBox = function() { ... };
goog.math.Rect.createFromPositionAndSize = function(position, size) { ... };