diff --git a/packages/react-devtools-extensions/src/injectGlobalHook.js b/packages/react-devtools-extensions/src/injectGlobalHook.js index 78037c515cdd8..6c3240ec9e48e 100644 --- a/packages/react-devtools-extensions/src/injectGlobalHook.js +++ b/packages/react-devtools-extensions/src/injectGlobalHook.js @@ -116,6 +116,7 @@ window.__REACT_DEVTOOLS_GLOBAL_HOOK__.on('renderer', function({reactBuildType}) window.postMessage({ source: 'react-devtools-detector', reactBuildType, + extensionId: "${CURRENT_EXTENSION_ID}", }, '*'); }); `; diff --git a/packages/react-devtools-extensions/src/main.js b/packages/react-devtools-extensions/src/main.js index 102cb7e7a6100..9a898e3d2e94e 100644 --- a/packages/react-devtools-extensions/src/main.js +++ b/packages/react-devtools-extensions/src/main.js @@ -217,7 +217,10 @@ function createPanelIfReactLoaded() { // Initialize the backend only once the Store has been initialized. // Otherwise the Store may miss important initial tree op codes. chrome.devtools.inspectedWindow.eval( - `window.postMessage({ source: 'react-devtools-inject-backend', extensionId: "${CURRENT_EXTENSION_ID}" }, '*');`, + `window.postMessage({ + source: 'react-devtools-inject-backend', + extensionId: "${CURRENT_EXTENSION_ID}" + }, '*');`, function(response, evalError) { if (evalError) { console.error(evalError); @@ -363,6 +366,7 @@ function createPanelIfReactLoaded() { chrome.devtools.inspectedWindow.eval(` window.postMessage({ source: 'react-devtools-extension', + extensionId: "${CURRENT_EXTENSION_ID}" payload: { type: 'fetch-file-with-cache', url: "${url}",