code: function(elements) {
                  var i, name, self = this,
                      node = self.firstChild;
                  if (node) {
                      do {
                          if (1 === node.type) {
                              // Ignore bogus elements
                              if (node.attributes.map['data-mce-bogus']) {
                                  continue;
                              }
                              // Keep empty elements like <img />
                              if (elements[node.name]) {
                                  return false;
                              }
                              // Keep bookmark nodes and name attribute like <a name="1"></a>
                              i = node.attributes.length;
                              while (i--) {
                                  name = node.attributes[i].name;
                                  if ('name' === name || 0 === name.indexOf('data-mce-bookmark')) {
                                      return false;
                                  }
                              }
                          }
                          // Keep comments
                          if (8 === node.type) {
                              return false;
                          }
                          // Keep non whitespace text nodes
                          if (3 === node.type && !whiteSpaceRegExp.test(node.value)) {
                              return false;
                          }
                      } while (node = walk(node, self));
                  }
                  return true;
              }
docs: Returns true/false if the node is to be considered empty or not.
  
  @example
  node.isEmpty({img: true});
  @method isEmpty
  @param {Object} elements Name/value object with elements that are automatically treated as non empty elements.
  @return {Boolean} true/false if the node is empty or not.