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 Timer

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 timer class abstraction above setInterval, used by Selenium JavaScript atoms.

Description

goog.Timer is a vendored copy of the Google Closure Library module. It provides a timer class that other classes and objects can listen on, serving as an abstraction above setInterval. It extends goog.events.EventTarget to dispatch tick events at configurable intervals, supports custom timer objects (for environments other than window), handles Firefox's early timer firing by rescheduling, and enforces a maximum timeout value to prevent 32-bit integer overflow. 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

Key Exports

goog.provide('goog.Timer');

goog.Timer = function(opt_interval, opt_timerObject) { ... };
goog.inherits(goog.Timer, goog.events.EventTarget);

// Default interval: 1ms
// Configurable timer object (defaults to window)
// Handles Firefox early timer firing via rescheduling

Related Pages

Page Connections

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