Steps to reproduce:

1) Disable all add-ons in Firefox
2) Open an URL that points to a XML file
3) AS EXPECTED: A pretty-printed XML is shown
4) Enable the React DevTools Add-on
5) Open the XML file again
6) FAIL: Only the content inside the XML tags are shown

Using Firefox Developer Edition 72.0b6 on macOS 10.15.2
nullthrows(script.parentNode).removeChild(script);
}
let lastDetectionResult;
window.addEventListener('message', function(evt) {
  if (evt.source !== window || !evt.data) {
    return;
  }
  if (evt.data.source === 'react-devtools-detector') {
    lastDetectionResult = {
      hasDetectedReact: true,
      reactBuildType: evt.data.reactBuildType,
    };
    chrome.runtime.sendMessage(lastDetectionResult);
  } else if (evt.data.source === 'react-devtools-inject-backend') {
    const script = document.createElement('script');
    script.src = chrome.runtime.getURL('build/backend.js');
    document.documentElement.appendChild(script);
    script.parentNode.removeChild(script);
  }
});
window.addEventListener('pageshow', function(evt) {
  if (!lastDetectionResult || evt.target !== window.document) {
    return;
  }
  chrome.runtime.sendMessage(lastDetectionResult);
});
const detectReact = `
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.on('renderer', function(evt) {
  window.postMessage({
    source: 'react-devtools-detector',