agent.js — react Source File
Architecture documentation for agent.js, a javascript file in the react codebase. 16 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR e3778820_57ff_7221_e2fb_64072d11afcc["agent.js"] 141645a3_e6e3_7211_4514_81e079648b8c["events.js"] e3778820_57ff_7221_e2fb_64072d11afcc --> 141645a3_e6e3_7211_4514_81e079648b8c bcb71f5e_1ecf_5620_9a9e_55d6ab61dd1f["constants.js"] e3778820_57ff_7221_e2fb_64072d11afcc --> bcb71f5e_1ecf_5620_9a9e_55d6ab61dd1f 5f7af8e4_c9b4_4304_fda4_1cd7083e24d7["index.js"] e3778820_57ff_7221_e2fb_64072d11afcc --> 5f7af8e4_c9b4_4304_fda4_1cd7083e24d7 257ae4e1_d9ef_2cd8_8e8f_05070ef27bd0["setupHighlighter"] e3778820_57ff_7221_e2fb_64072d11afcc --> 257ae4e1_d9ef_2cd8_8e8f_05070ef27bd0 c252378b_d680_96f7_afbe_5200374b78e8["index.js"] e3778820_57ff_7221_e2fb_64072d11afcc --> c252378b_d680_96f7_afbe_5200374b78e8 0dbca917_b56d_be3e_65dd_4f8f3c37ea7f["initialize"] e3778820_57ff_7221_e2fb_64072d11afcc --> 0dbca917_b56d_be3e_65dd_4f8f3c37ea7f a5bf3ae2_91ae_c847_c3ff_24e5d6641d4d["toggleEnabled"] e3778820_57ff_7221_e2fb_64072d11afcc --> a5bf3ae2_91ae_c847_c3ff_24e5d6641d4d 0304bbc8_f110_6643_71c6_d26bddc58fde["types.js"] e3778820_57ff_7221_e2fb_64072d11afcc --> 0304bbc8_f110_6643_71c6_d26bddc58fde 2e686050_4065_de33_2d80_1361879d66c9["canvas.js"] e3778820_57ff_7221_e2fb_64072d11afcc --> 2e686050_4065_de33_2d80_1361879d66c9 9487a7c4_3e86_9e27_9d66_67935d8470b6["index.js"] e3778820_57ff_7221_e2fb_64072d11afcc --> 9487a7c4_3e86_9e27_9d66_67935d8470b6 04db4ed0_38d9_2b54_911c_3f20b16c3c86["storage.js"] e3778820_57ff_7221_e2fb_64072d11afcc --> 04db4ed0_38d9_2b54_911c_3f20b16c3c86 b0c07a24_53d0_2121_9799_c070e681d4ec["sessionStorageGetItem"] e3778820_57ff_7221_e2fb_64072d11afcc --> b0c07a24_53d0_2121_9799_c070e681d4ec 28fdd607_4e13_5df1_1d04_bf1dce9e4460["sessionStorageRemoveItem"] e3778820_57ff_7221_e2fb_64072d11afcc --> 28fdd607_4e13_5df1_1d04_bf1dce9e4460 1e5be373_9761_1506_ca09_27b3472e8ec7["sessionStorageSetItem"] e3778820_57ff_7221_e2fb_64072d11afcc --> 1e5be373_9761_1506_ca09_27b3472e8ec7 style e3778820_57ff_7221_e2fb_64072d11afcc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import EventEmitter from '../events';
import {
SESSION_STORAGE_LAST_SELECTION_KEY,
UNKNOWN_SUSPENDERS_NONE,
__DEBUG__,
} from '../constants';
import setupHighlighter from './views/Highlighter';
import {
initialize as setupTraceUpdates,
toggleEnabled as setTraceUpdatesEnabled,
} from './views/TraceUpdates';
import {currentBridgeProtocol} from 'react-devtools-shared/src/bridge';
import type {BackendBridge} from 'react-devtools-shared/src/bridge';
import type {
InstanceAndStyle,
HostInstance,
OwnersList,
PathFrame,
PathMatch,
RendererID,
RendererInterface,
DevToolsHookSettings,
InspectedElement,
} from './types';
import type {
ComponentFilter,
DehydratedData,
ElementType,
} from 'react-devtools-shared/src/frontend/types';
import type {GroupItem} from './views/TraceUpdates/canvas';
import {gte, isReactNativeEnvironment} from './utils';
import {
sessionStorageGetItem,
sessionStorageRemoveItem,
sessionStorageSetItem,
} from '../storage';
const debug = (methodName: string, ...args: Array<string>) => {
if (__DEBUG__) {
console.log(
`%cAgent %c${methodName}`,
'color: purple; font-weight: bold;',
'font-weight: bold;',
...args,
);
}
};
type ElementAndRendererID = {
id: number,
// ... (1161 more lines)
Domain
Dependencies
Imported By
Source
Frequently Asked Questions
What does agent.js do?
agent.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain.
What does agent.js depend on?
agent.js imports 16 module(s): bridge, canvas.js, constants.js, events.js, index.js, index.js, index.js, initialize, and 8 more.
What files import agent.js?
agent.js is imported by 3 file(s): canvas.js, index.js, types.js.
Where is agent.js in the architecture?
agent.js is located at packages/react-devtools-shared/src/backend/agent.js (domain: BabelCompiler, directory: packages/react-devtools-shared/src/backend).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free