docs: function sightread(element, childRegistry) {
    if (!element || element === document) element = window;
    if (!childRegistry && !getChildRegistry(element)) return;
  
    // Clear the child registry.
    if (!childRegistry) {
      element.__private__.childRegistry = {};
      childRegistry = getChildRegistry(element);
    }
  
    element = (element === window) ? document.body : (element.shadowRoot ? element.shadowRoot : element);
  
    assert(element, 'Element is invalid. Too early to sightread?');
    const n = element.childNodes.length;
  
    for (let i = 0; i < n; i++) {
      let e = element.childNodes[i];
  
      if (!(e instanceof Node)) continue;
      if (addToChildRegistry(childRegistry, e)) {
        if (!isCustomElement(e)) {
          if (!e.__private__) e.__private__ = {};
          if (!e.__private__.childRegistry) e.__private__.childRegistry = {};
          sightread(e);
        }
      }
      else {
        sightread(e, childRegistry);
      }
    }
  }