src/v1/index.js
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);
    }
  });
}
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);
    }
  });
}
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 ) ; } } ) ; }
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.
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 .