https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected
Node: isConnected property - Web APIs | MDN
The read-only isConnected property of the Node interface returns a boolean indicating whether the node is connected (directly or indirectly) to a Document...
web apisnodeisconnectedpropertymdn