GeezerVison is showing github.com — Fixed web extensions · react/react@58b39c6
File treeExpand file treeCollapse file tree Open diff view settings react-devtools-extensions
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/src/main.js +45-35Lines changed: 45 additions & 35 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -227,47 +227,57 @@ function createPanelIfReactLoaded() { | 227 | 227 | let currentPanel = null; | 228 | 228 | let needsToSyncElementSelection = false; | 229 | 229 |
| 230 | | - chrome.devtools.panels.create('⚛ Components', '', 'panel.html', panel => { | 231 | | - panel.onShown.addListener(() => { | 232 | | - if (needsToSyncElementSelection) { | 233 | | - needsToSyncElementSelection = false; | 234 | | - bridge.send('syncSelectionFromNativeElementsPanel'); | 235 | | - } | | 230 | + chrome.devtools.panels.create( | | 231 | + '⚛ Components', | | 232 | + '', | | 233 | + 'panel.html', | | 234 | + extensionPanel => { | | 235 | + extensionPanel.onShown.addListener(panel => { | | 236 | + if (needsToSyncElementSelection) { | | 237 | + needsToSyncElementSelection = false; | | 238 | + bridge.send('syncSelectionFromNativeElementsPanel'); | | 239 | + } | 236 | 240 |
| 237 | | - if (currentPanel === panel) { | 238 | | - return; | 239 | | - } | | 241 | + if (currentPanel === panel) { | | 242 | + return; | | 243 | + } | 240 | 244 |
| 241 | | - currentPanel = panel; | 242 | | - componentsPortalContainer = panel.container; | | 245 | + currentPanel = panel; | | 246 | + componentsPortalContainer = panel.container; | 243 | 247 |
| 244 | | - if (componentsPortalContainer != null) { | 245 | | - ensureInitialHTMLIsCleared(componentsPortalContainer); | 246 | | - render('components'); | 247 | | - panel.injectStyles(cloneStyleTags); | 248 | | - } | 249 | | - }); | 250 | | - panel.onHidden.addListener(() => { | 251 | | - // TODO: Stop highlighting and stuff. | 252 | | - }); | 253 | | - }); | | 248 | + if (componentsPortalContainer != null) { | | 249 | + ensureInitialHTMLIsCleared(componentsPortalContainer); | | 250 | + render('components'); | | 251 | + panel.injectStyles(cloneStyleTags); | | 252 | + } | | 253 | + }); | | 254 | + extensionPanel.onHidden.addListener(panel => { | | 255 | + // TODO: Stop highlighting and stuff. | | 256 | + }); | | 257 | + }, | | 258 | + ); | 254 | 259 |
| 255 | | - chrome.devtools.panels.create('⚛ Profiler', '', 'panel.html', panel => { | 256 | | - panel.onShown.addListener(() => { | 257 | | - if (currentPanel === panel) { | 258 | | - return; | 259 | | - } | | 260 | + chrome.devtools.panels.create( | | 261 | + '⚛ Profiler', | | 262 | + '', | | 263 | + 'panel.html', | | 264 | + extensionPanel => { | | 265 | + extensionPanel.onShown.addListener(panel => { | | 266 | + if (currentPanel === panel) { | | 267 | + return; | | 268 | + } | 260 | 269 |
| 261 | | - currentPanel = panel; | 262 | | - profilerPortalContainer = panel.container; | | 270 | + currentPanel = panel; | | 271 | + profilerPortalContainer = panel.container; | 263 | 272 |
| 264 | | - if (profilerPortalContainer != null) { | 265 | | - ensureInitialHTMLIsCleared(profilerPortalContainer); | 266 | | - render('profiler'); | 267 | | - panel.injectStyles(cloneStyleTags); | 268 | | - } | 269 | | - }); | 270 | | - }); | | 273 | + if (profilerPortalContainer != null) { | | 274 | + ensureInitialHTMLIsCleared(profilerPortalContainer); | | 275 | + render('profiler'); | | 276 | + panel.injectStyles(cloneStyleTags); | | 277 | + } | | 278 | + }); | | 279 | + }, | | 280 | + ); | 271 | 281 |
| 272 | 282 | chrome.devtools.network.onNavigated.removeListener(checkPageForReact); | 273 | 283 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/webpack.backend.js +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -30,7 +30,9 @@ module.exports = { | 30 | 30 | resolve: { | 31 | 31 | alias: { | 32 | 32 | react: resolve(builtModulesDir, 'react'), | | 33 | + 'react-debug-tools': resolve(builtModulesDir, 'react-debug-tools'), | 33 | 34 | 'react-dom': resolve(builtModulesDir, 'react-dom'), | | 35 | + 'react-is': resolve(builtModulesDir, 'react-is'), | 34 | 36 | scheduler: resolve(builtModulesDir, 'scheduler'), | 35 | 37 | }, | 36 | 38 | }, | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/webpack.config.js +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -35,7 +35,9 @@ module.exports = { | 35 | 35 | resolve: { | 36 | 36 | alias: { | 37 | 37 | react: resolve(builtModulesDir, 'react'), | | 38 | + 'react-debug-tools': resolve(builtModulesDir, 'react-debug-tools'), | 38 | 39 | 'react-dom': resolve(builtModulesDir, 'react-dom'), | | 40 | + 'react-is': resolve(builtModulesDir, 'react-is'), | 39 | 41 | scheduler: resolve(builtModulesDir, 'scheduler'), | 40 | 42 | }, | 41 | 43 | }, | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-inline/webpack.config.js +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -31,7 +31,9 @@ module.exports = { | 31 | 31 | }, | 32 | 32 | externals: { | 33 | 33 | react: 'react', | | 34 | + 'react-debug-tools': 'react-debug-tools', | 34 | 35 | 'react-dom': 'react-dom', | | 36 | + 'react-is': 'react-is', | 35 | 37 | scheduler: 'scheduler', | 36 | 38 | }, | 37 | 39 | plugins: [ | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-shell/webpack.config.js +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -35,6 +35,8 @@ const config = { | 35 | 35 | alias: { | 36 | 36 | react: resolve(builtModulesDir, 'react'), | 37 | 37 | 'react-dom': resolve(builtModulesDir, 'react-dom'), | | 38 | + 'react-debug-tools': resolve(builtModulesDir, 'react-debug-tools'), | | 39 | + 'react-is': resolve(builtModulesDir, 'react-is'), | 38 | 40 | scheduler: resolve(builtModulesDir, 'scheduler'), | 39 | 41 | }, | 40 | 42 | }, | |
|