document.body.contains cannot be used to check for the existence of the deep-chat node if it is inside of a shadow DOM (for example, if it is nested in another web component). Instead, we can use getRootNode to check if the deep-chat node is attached to the document.
document.body.contains
cannot be used to check for the existence of the deep-chat node if it is inside of a shadow DOM (for example, if it is nested in another web component). Instead, we can usegetRootNode
to check if the deep-chat node is attached to the document.Fixes #193