GeezerVison is showing github.com — Moved inline comment. · react/react@f09854a
File tree
Expand file treeCollapse file tree
Open diff view settings
packages/react-devtools-extensions/src
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/src/injectGlobalHook.js +3-5Lines changed: 3 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -31,12 +31,10 @@ window.addEventListener('message', function(evt) { |
31 | 31 | reactBuildType: evt.data.reactBuildType, |
32 | 32 | }; |
33 | 33 | chrome.runtime.sendMessage(lastDetectionResult); |
34 | | - |
35 | | - // Inject the backend. This is done in the content script to avoid CSP |
36 | | - // and Trusted Types violations, since content scripts can modify the DOM |
37 | | - // and are not subject to the page's policies. |
38 | 34 | } else if (evt.data.source === 'react-devtools-inject-backend') { |
39 | | - // the prototype stuff is in case document.createElement has been modified |
| 35 | + // The backend is injected by the content script to avoid CSP and Trusted Types violations, |
| 36 | + // since content scripts can modify the DOM and are not subject to the page's policies. |
| 37 | + // The prototype stuff is in case document.createElement has been modified. |
40 | 38 | const script = document.constructor.prototype.createElement.call( |
41 | 39 | document, |
42 | 40 | 'script', |
|