RichText/Archived/Rooster/Rooster.gcomp/Support/node_modules/roosterjs/dist/rooster-amd.js
/**
 * Check if a given node has no visible content
 * @param node The node to check
 * @param trimContent Whether trim the text content so that spaces will be treated as empty.
 * Default value is false
 * @returns True if there isn't any visible element inside node, otherwise false
 */
Check if a given node has no visible content
@param node The node to check
@param trimContent Whether trim the text content so that spaces will be treated as empty.
Default value is false
@returns True if there isn't any visible element inside node, otherwise false
Check if a given node has no visible content @param node The node to check @param trimContent Whether trim the text content so that spaces will be treated as empty . Default value is false @returns True if there isn ' t any visible element inside node otherwise false
function isNodeEmpty(node, trimContent) {
    if (!node) {
        return false;
    }
    else if (node.nodeType == 3 ) {
        return trim(node.nodeValue, trimContent) == '';
    }
    else if (node.nodeType == 1 ) {
        var element = node;
        var textContent = trim(element.textContent, trimContent);
        if (textContent != '' ||
            VISIBLE_ELEMENT_TAGS.indexOf(getTagOfNode_1.default(element)) >= 0 ||
            element.querySelectorAll(VISIBLE_CHILD_ELEMENT_SELECTOR)[0]) {
            return false;
        }
    }
    return true;
}
function isNodeEmpty ( node , trimContent ) { if ( ! node ) { return false ; } else if ( node . nodeType == 3 ) { return trim ( node . nodeValue , trimContent ) == '' ; } else if ( node . nodeType == 1 ) { var element = node ; var textContent = trim ( element . textContent , trimContent ) ; if ( textContent != '' || VISIBLE_ELEMENT_TAGS . indexOf ( getTagOfNode_1 . default ( element ) ) >= 0 || element . querySelectorAll ( VISIBLE_CHILD_ELEMENT_SELECTOR ) [ 0 ] ) { return false ; } } return true ; }
Check if a given node has no visible content
 @param node The node to check
 @param trimContent Whether trim the text content so that spaces will be treated as empty.
Check if a given node has no visible content @param node The node to check @param trimContent Whether trim the text content so that spaces will be treated as empty .
/* Text */ /* Element */