Change:
Any client that connects to the standalone DevTools While using the standalone DevTools app: a client to the DevTools that client and you should be redirected to the introduction page The event listeners are not re-attached to the splash page elements after the client disconnects. The <scripttags that can be copied on click and the "Profiler tab" link stop working. Every time No response No response No response No response No response No response
I was thinking about two ways to fix this issue: set a MutationObserver to re-attach the listeners when the contents of the root node are changed, or add a callback to the DevToolsUI in the core of the standalone version and re-attach the listeners on that callback.
Nice find! If you'd be interested in submitting a proposal (PR) I'd be happy to review and discuss.
Sure thing, will do!

Discussion:
installHook(window); export type StatusListener = (message: string) => void; <ins> export type OnDisconnectedCallback = () => void; </ins> let node: HTMLElement = ((null: any): HTMLElement); let nodeWaitingToConnectHTML: string = ''; let projectRoots: Array<string> = []; let statusListener: StatusListener = (message: string) => {}; <ins> let disconnectedCallback: OnDisconnectedCallback = () => {}; </ins> // TODO (Webpack 5) Hopefully we can remove this prop after the Webpack 5 migration. function hookNamesModuleLoaderFunction() {

return DevtoolsUI; } <ins> function setDisconnectedCallback(value: OnDisconnectedCallback) { disconnectedCallback = value; return DevtoolsUI; } </ins> let bridge: FrontendBridge | null = null; let store: Store | null = null; let root = null;

safeUnmount(); node.innerHTML = nodeWaitingToConnectHTML; <ins> disconnectedCallback(); </ins> } function onError({code, message}) {

setContentDOMNode, setProjectRoots, setStatusListener, <ins> setDisconnectedCallback, </ins> startServer, openProfiler, };

const server = defaultPort ? `${protocol}://${host}` : `${protocol}://${host}:${port}`; const serverIp = defaultPort ? `${protocol}://${localIp}` : `${protocol}://${localIp}:${port}`; const $ = document.querySelector.bind(document); <del> const $promptDiv = $("#box-content-prompt"); const $confirmationDiv = $("#box-content-confirmation"); </del> let timeoutID; function selectAllAndCopy(event) { const element = event.target; if (window.getSelection) {

selection.removeAllRanges(); selection.addRange(range); clipboard.writeText(event.target.textContent); <ins> const $promptDiv = $("#box-content-prompt"); const $confirmationDiv = $("#box-content-confirmation"); </ins> $promptDiv.classList.add('hidden'); $confirmationDiv.classList.remove('hidden');

.openProfiler(); } <del> const link = $('#rn-help-link'); link.addEventListener('click', event => { event.preventDefault(); require('electron').shell.openExternal(link.href); }); const $localhost = $("#localhost"); $localhost.innerText = `<script src="${server}"></` + 'script>'; $localhost.addEventListener('click', selectAllAndCopy); $localhost.addEventListener('focus', selectAllAndCopy); const $byIp = $("#byip"); $byIp.innerText = `<script src="${serverIp}"></` + 'script>'; $byIp.addEventListener('click', selectAllAndCopy); $byIp.addEventListener('focus', selectAllAndCopy); </del> <ins> function attachListeners() { const link = $('#rn-help-link'); link.addEventListener('click', event => { event.preventDefault(); require('electron').shell.openExternal(link.href); }); const $localhost = $("#localhost"); $localhost.innerText = `<script src="${server}"></` + 'script>'; $localhost.addEventListener('click', selectAllAndCopy); $localhost.addEventListener('focus', selectAllAndCopy); const $byIp = $("#byip"); $byIp.innerText = `<script src="${serverIp}"></` + 'script>'; $byIp.addEventListener('click', selectAllAndCopy); $byIp.addEventListener('focus', selectAllAndCopy); const $profiler = $("#profiler"); $profiler.addEventListener('click', openProfiler); }; </ins> <del> const $profiler = $("#profiler"); $profiler.addEventListener('click', openProfiler); </del> <ins> // Initially attach the listeners attachListeners(); </ins> let devtools; try {

window.devtools = devtools; window.server = devtools .setContentDOMNode(document.getElementById("container")) <ins> .setDisconnectedCallback(attachListeners) </ins> .setStatusListener(function(status) { const element = document.getElementById("loading-status"); if (element) {