* Gets visible text content from a message element in the DOM. * @param {string} messageId - The message ID * @returns {string|null} The text content or null
(messageId)
| 872 | |
| 873 | detachQuickAskWindowForRender(sessionId) { |
| 874 | if (!this.shouldPreserveQuickAskWindowForRender(sessionId)) return null; |
| 875 | const panel = this.quickAsk.window; |
| 876 | if (panel.isConnected) { |
| 877 | panel.remove(); |
| 878 | } |
| 879 | return panel; |
| 880 | } |
| 881 | |
| 882 | restoreQuickAskWindowAfterRender(panel, sessionId) { |
| 883 | if (!panel || panel !== this.quickAsk.window) return; |
| 884 | if (!this.shouldPreserveQuickAskWindowForRender(sessionId)) return; |
| 885 | |
| 886 | if (!panel.isConnected || |
| 887 | panel.parentElement !== document.body) { |
| 888 | document.body.appendChild(panel); |
no test coverage detected