Implementation:SeleniumHQ Selenium Closure UserAgent Browser
| Knowledge Sources | |
|---|---|
| Domains | JavaScript_Atoms, Vendored_Library |
| Last Updated | 2026-02-12 00:00 GMT |
Overview
Vendored Google Closure Library module providing browser user agent detection used by Selenium JavaScript atoms.
Description
goog.labs.userAgent.browser is a vendored copy of the Google Closure Library module. It provides browser detection capabilities using user agent string analysis and the newer User-Agent Client Hints API. The module defines a Brand enum covering major browsers (Chromium, Edge, Firefox, IE, Opera, Safari, Android Browser, Silk) and supports high-entropy version detection. 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/labs/useragent/browser.js
- Lines: 1-790
Key Exports
goog.module('goog.labs.userAgent.browser');
const Brand = {
ANDROID_BROWSER: 'Android Browser',
CHROMIUM: 'Chromium',
EDGE: 'Microsoft Edge',
FIREFOX: 'Firefox',
IE: 'Internet Explorer',
OPERA: 'Opera',
SAFARI: 'Safari',
SILK: 'Silk',
};