code: function isContained(node, range) {
          return getRootContainer(node) == getRootContainer(range.startContainer)
              && dom.comparePoints(node, 0, range.startContainer, range.startOffset) == 1
              && dom.comparePoints(node, dom.getNodeLength(node), range.endContainer, range.endOffset) == -1;
      }
docs: "contained" as defined by DOM Range: "A Node node is contained in a range range if node's furthest ancestor is the same as range's root, and (node, 0) is after range's start, and (node, length of node) is before range's end."