Home / Function/ startActivation() — react Function Reference

startActivation() — react Function Reference

Architecture documentation for the startActivation() function in backend.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  cf14c8f7_70ff_92fb_fec3_36e531d5163e["startActivation()"]
  354fe138_8fc9_c8a1_a2a8_b5eba888a4c5["backend.js"]
  cf14c8f7_70ff_92fb_fec3_36e531d5163e -->|defined in| 354fe138_8fc9_c8a1_a2a8_b5eba888a4c5
  e1996531_1f9f_9231_1f53_51768602c5c4["activate()"]
  e1996531_1f9f_9231_1f53_51768602c5c4 -->|calls| cf14c8f7_70ff_92fb_fec3_36e531d5163e
  style cf14c8f7_70ff_92fb_fec3_36e531d5163e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-inline/src/backend.js lines 29–51

function startActivation(contentWindow: any, bridge: BackendBridge) {
  const onSavedPreferences = (data: SavedPreferencesParams) => {
    // This is the only message we're listening for,
    // so it's safe to cleanup after we've received it.
    bridge.removeListener('savedPreferences', onSavedPreferences);

    const {componentFilters} = data;

    resolveComponentFiltersInjection(componentFilters);
  };

  componentFiltersPromise.then(
    finishActivation.bind(null, contentWindow, bridge),
  );

  bridge.addListener('savedPreferences', onSavedPreferences);

  // The backend may be unable to read saved preferences directly,
  // because they are stored in localStorage within the context of the extension (on the frontend).
  // Instead it relies on the extension to pass preferences through.
  // Because we might be in a sandboxed iframe, we have to ask for them by way of postMessage().
  bridge.send('getSavedPreferences');
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does startActivation() do?
startActivation() is a function in the react codebase, defined in packages/react-devtools-inline/src/backend.js.
Where is startActivation() defined?
startActivation() is defined in packages/react-devtools-inline/src/backend.js at line 29.
What calls startActivation()?
startActivation() is called by 1 function(s): activate.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free