   #
   # Returns an Array of TextNode instances.
   textNodes: ->
-    textNodes = $(this.commonAncestor).textNodes()
+    textNodes = Util.getTextNodes($(this.commonAncestor))
     [start, end] = [textNodes.index(this.start), textNodes.index(this.end)]
     # Return the textNodes that fall between the start and end indexes.
     $.makeArray textNodes[start..end]

      console.log "Trying fallback..."
      # We have a an 'evaluator' for the really simple expressions that
      # should work for the simple expressions we generate.
      $.xpath xp, root

  if not $.isXMLDoc document.documentElement
    evaluateXPath xpath

      else
        origParent = $(node).parent()

      xpath = Util.xpathFromNode(origParent, root)[0]
      textNodes = Util.getTextNodes(origParent)

      # Calculate real offset as the combined length of all the
      # preceding textNode siblings. We include the length of the
