From 60f6b623d84015457c3707535bb54a1941451190 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 30 Oct 2007 09:24:51 +0000 Subject: [PATCH] merge improved v.buffer.evaluateXPath --- content/buffers.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/buffers.js b/content/buffers.js index b45f234e..85320fff 100644 --- a/content/buffers.js +++ b/content/buffers.js @@ -144,12 +144,14 @@ vimperator.Buffer = function() //{{{ }); // returns an XPathResult object - this.evaluateXPath = function(expression, doc, ordered) + this.evaluateXPath = function(expression, doc, elem, ordered) { if (!doc) doc = window.content.document; + if (!elem) + elem = doc; - var result = doc.evaluate(expression, doc, + var result = doc.evaluate(expression, elem, function lookupNamespaceURI(prefix) { switch (prefix) { case 'xhtml':