src/basis/dom.js
function swap(nodeA, nodeB){
    if (nodeA === nodeB || comparePosition(nodeA, nodeB) & (POSITION_CONTAINED_BY | POSITION_CONTAINS | POSITION_DISCONNECTED))
      return false;

    replace(nodeA, testElement);
    replace(nodeB, nodeA);
    replace(testElement, nodeB);

    return true;
  }
function swap(nodeA, nodeB){
    if (nodeA === nodeB || comparePosition(nodeA, nodeB) & (POSITION_CONTAINED_BY | POSITION_CONTAINS | POSITION_DISCONNECTED))
      return false;

    replace(nodeA, testElement);
    replace(nodeB, nodeA);
    replace(testElement, nodeB);

    return true;
  }
function swap ( nodeA , nodeB ) { if ( nodeA === nodeB || comparePosition ( nodeA , nodeB ) & ( POSITION_CONTAINED_BY | POSITION_CONTAINS | POSITION_DISCONNECTED ) ) return false ; replace ( nodeA , testElement ) ; replace ( nodeB , nodeA ) ; replace ( testElement , nodeB ) ; return true ; }
Change placing of nodes and returns the result of operation.
@param {Node} nodeA
@param {Node} nodeB
@return {boolean}
Change placing of nodes and returns the result of operation .