Implementation:SeleniumHQ Selenium Closure Promise
| Knowledge Sources | |
|---|---|
| Domains | JavaScript_Atoms, Vendored_Library |
| Last Updated | 2026-02-12 00:00 GMT |
Overview
Vendored Google Closure Library module providing a Promise implementation with cancellation support used by Selenium JavaScript atoms.
Description
goog.Promise is a vendored copy of the Google Closure Library module. It provides a Promises/A+ compliant implementation that predates native browser Promises. Unlike native Promises, goog.Promise supports cancellation. The class implements goog.Thenable and supports resolve/reject patterns, chaining via then(), and interoperability with other Promise-like (Thenable) objects. New code is generally recommended to use native Promise instead. 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/promise/promise.js
- Lines: 1-1474
Key Exports
goog.provide('goog.Promise');
goog.Promise = function(resolver, opt_context) { ... };
// Implements goog.Thenable<TYPE>
// Supports cancellation unlike native Promise