function(element) {
    // There should be exactly 1 element child which is a P:
    if (element.children.length != 1 || element.children[0].tagName !== "P") {
      return false;
    }

    // And there should be no text nodes with real content
    return !this._someNode(element.childNodes, function(node) {
      return node.nodeType === this.TEXT_NODE &&
             this.REGEXPS.hasContent.test(node.textContent);
    });
  }
function(element) {
    // There should be exactly 1 element child which is a P:
    if (element.children.length != 1 || element.children[0].tagName !== "P") {
      return false;
    }

    // And there should be no text nodes with real content
    return !this._someNode(element.childNodes, function(node) {
      return node.nodeType === this.TEXT_NODE &&
             this.REGEXPS.hasContent.test(node.textContent);
    });
  }
function ( element ) { // There should be exactly 1 element child which is a P: if ( element . children . length != 1 || element . children [ 0 ] . tagName !== "P" ) { return false ; } // And there should be no text nodes with real content return ! this . _someNode ( element . childNodes , function ( node ) { return node . nodeType === this . TEXT_NODE && this . REGEXPS . hasContent . test ( node . textContent ) ; } ) ; }
Check if this node has only whitespace and a single P element
Returns false if the DIV node contains non-empty text nodes
or if it contains no P or more than 1 element.

@param Element
Check if this node has only whitespace and a single P element Returns false if the DIV node contains non - empty text nodes or if it contains no P or more than 1 element .
Returns true if the element has no children