RichText/Archived/Rooster/Rooster.gcomp/Support/node_modules/roosterjs/dist/rooster-amd.js
/**
 * Check if this position is at beginning of the given node.
 * This will return true if all nodes between the beginning of target node and the position are empty.
 * @param position The position to check
 * @param targetNode The node to check
 * @returns True if position is at beginning of the node, otherwise false
 */
Check if this position is at beginning of the given node.
This will return true if all nodes between the beginning of target node and the position are empty.
@param position The position to check
@param targetNode The node to check
@returns True if position is at beginning of the node, otherwise false
Check if this position is at beginning of the given node . This will return true if all nodes between the beginning of target node and the position are empty . @param position The position to check @param targetNode The node to check @returns True if position is at beginning of the node otherwise false
function isPositionAtBeginningOf(position, targetNode) {
    if (position) {
        var _a = position.normalize(), node = _a.node, offset = _a.offset;
        if (offset == 0) {
            while (contains_1.default(targetNode, node) && areAllPrevousNodesEmpty(node)) {
                node = node.parentNode;
            }
            return node == targetNode;
        }
    }
    return false;
}
function isPositionAtBeginningOf ( position , targetNode ) { if ( position ) { var _a = position . normalize ( ) , node = _a . node , offset = _a . offset ; if ( offset == 0 ) { while ( contains_1 . default ( targetNode , node ) && areAllPrevousNodesEmpty ( node ) ) { node = node . parentNode ; } return node == targetNode ; } } return false ; }
Check if this position is at beginning of the given node.
Check if this position is at beginning of the given node .