code: function addNodeToSlot (slot, node, insertBefore) {
    const isInDefaultMode = slot.assignedNodes().length === 0;
    registerNode(slot, node, insertBefore, eachNode => {
      if (isInDefaultMode) {
        slot.__insertBefore(eachNode, insertBefore !== undefined ? insertBefore : null);
      }
    });
  }
docs: Adds a node to a slot. In other words, adds default content to a slot. It ensures that if the slot doesn't have any assigned nodes yet, that the node is actually displayed, otherwise it's just registered as child content.