utils.js — react Source File
Architecture documentation for utils.js, a javascript file in the react codebase. 1 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR 74bd19f4_2af1_7f72_caea_df13aa3e4693["utils.js"] ce034302_61e9_5cdc_95e6_1e120df583e4["DevTools"] 74bd19f4_2af1_7f72_caea_df13aa3e4693 --> ce034302_61e9_5cdc_95e6_1e120df583e4 2a362e81_2400_54f3_7410_376f8ae7be77["backend.js"] 2a362e81_2400_54f3_7410_376f8ae7be77 --> 74bd19f4_2af1_7f72_caea_df13aa3e4693 eda1c637_7f7a_9fee_baa9_c174b535138c["messageHandlers.js"] eda1c637_7f7a_9fee_baa9_c174b535138c --> 74bd19f4_2af1_7f72_caea_df13aa3e4693 b5e42467_7633_e234_1d51_a93bfc4818c7["index.js"] b5e42467_7633_e234_1d51_a93bfc4818c7 --> 74bd19f4_2af1_7f72_caea_df13aa3e4693 style 74bd19f4_2af1_7f72_caea_df13aa3e4693 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/* global chrome */
import type {BrowserTheme} from 'react-devtools-shared/src/devtools/views/DevTools';
export function getBrowserTheme(): BrowserTheme {
if (__IS_CHROME__) {
// chrome.devtools.panels added in Chrome 18.
// chrome.devtools.panels.themeName added in Chrome 54.
return chrome.devtools.panels.themeName === 'dark' ? 'dark' : 'light';
} else {
// chrome.devtools.panels.themeName added in Firefox 55.
// https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/devtools.panels/themeName
if (chrome.devtools && chrome.devtools.panels) {
switch (chrome.devtools.panels.themeName) {
case 'dark':
return 'dark';
default:
return 'light';
}
}
}
}
export const COMPACT_VERSION_NAME = 'compact';
export const EXTENSION_CONTAINED_VERSIONS = [COMPACT_VERSION_NAME];
Domain
Subdomains
Functions
Dependencies
- DevTools
Imported By
Source
Frequently Asked Questions
What does utils.js do?
utils.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in utils.js?
utils.js defines 1 function(s): getBrowserTheme.
What does utils.js depend on?
utils.js imports 1 module(s): DevTools.
What files import utils.js?
utils.js is imported by 3 file(s): backend.js, index.js, messageHandlers.js.
Where is utils.js in the architecture?
utils.js is located at packages/react-devtools-extensions/src/utils.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-extensions/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free