mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Removed DT inject() script since it's no longer being used
This commit is contained in:
24
packages/react-devtools-extensions/src/inject.js
vendored
24
packages/react-devtools-extensions/src/inject.js
vendored
@@ -1,24 +0,0 @@
|
||||
/* global chrome */
|
||||
|
||||
export default function inject(scriptName: string, done: ?Function) {
|
||||
const source = `
|
||||
// the prototype stuff is in case document.createElement has been modified
|
||||
(function () {
|
||||
var script = document.constructor.prototype.createElement.call(document, 'script');
|
||||
script.src = "${scriptName}";
|
||||
script.charset = "utf-8";
|
||||
document.documentElement.appendChild(script);
|
||||
script.parentNode.removeChild(script);
|
||||
})()
|
||||
`;
|
||||
|
||||
chrome.devtools.inspectedWindow.eval(source, function(response, error) {
|
||||
if (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
if (typeof done === 'function') {
|
||||
done();
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user