1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-04-11 00:03:32 +02:00

merge improved v.buffer.evaluateXPath

This commit is contained in:
Doug Kearns
2007-10-30 09:24:51 +00:00
parent 8f06461864
commit 60f6b623d8

View File

@@ -144,12 +144,14 @@ vimperator.Buffer = function() //{{{
}); });
// returns an XPathResult object // returns an XPathResult object
this.evaluateXPath = function(expression, doc, ordered) this.evaluateXPath = function(expression, doc, elem, ordered)
{ {
if (!doc) if (!doc)
doc = window.content.document; doc = window.content.document;
if (!elem)
elem = doc;
var result = doc.evaluate(expression, doc, var result = doc.evaluate(expression, elem,
function lookupNamespaceURI(prefix) { function lookupNamespaceURI(prefix) {
switch (prefix) { switch (prefix) {
case 'xhtml': case 'xhtml':