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:
@@ -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':
|
||||||
|
|||||||
Reference in New Issue
Block a user