docs: function isNodeConnected(node) {
    // Ensure that node is attached if specified. This check uses a new and
    // fast `isConnected` API and thus only checked on platforms that have it.
    // See https://www.chromestatus.com/feature/5676110549352448.
    if ('isConnected' in node) {
      return node['isConnected'];
    }
    // Polyfill.
    const root = node.ownerDocument && node.ownerDocument.documentElement;
    return (root && root.contains(node)) || false;
  }