code: function isEffectivelyContained(node, range) {
          if (isContained(node, range)) {
              return true;
          }
          var isCharData = dom.isCharacterDataNode(node);
          if (node == range.startContainer && isCharData && dom.getNodeLength(node) != range.startOffset) {
              return true;
          }
          if (node == range.endContainer && isCharData && range.endOffset != 0) {
              return true;
          }
          var children = node.childNodes, childCount = children.length;
          if (childCount != 0) {
              for (var i = 0; i < childCount; ++i) {
                  if (!isEffectivelyContained(children[i], range)) {
                      return false;
                  }
              }
              return true;
          }
          return false;
      }
docs: "A Node is effectively contained in a Range if either it is contained in the
  Range; or it is the Range's start node, it is a Text node, and its length is
  different from the Range's start offset; or it is the Range's end node, it
  is a Text node, and the Range's end offset is not 0; or it has at least one
  child, and all its children are effectively contained in the Range."