Skip to content
This repository
Browse code

Compat with apf.js

  • Loading branch information...
commit b616d5156548876e485a1b9eb29b1a5c392e9ed3 1 parent d4d6b7e
Luis Merino authored July 22, 2011

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  debugwin/apf_debugwin.js
6  debugwin/apf_debugwin.js
@@ -68743,8 +68743,8 @@ apf.runGecko = function(){
68743 68743
     
68744 68744
     //XMLDocument.selectSingleNode
68745 68745
     HTMLDocument.prototype.selectSingleNode = XMLDocument.prototype.selectSingleNode = function(sExpr, contextNode){
68746  
-        var nodeList = this.selectNodes(sExpr + "[1]", contextNode || null);
68747  
-        return nodeList[0] || null;
  68746
+        var nodeList = this.selectNodes("(" + sExpr + ")[1]", contextNode || null);
  68747
+        return nodeList.length > 0 ? nodeList[0] : null;
68748 68748
     };
68749 68749
     
68750 68750
     //Element.selectSingleNode
@@ -70321,7 +70321,7 @@ apf.runOpera = function (){
70321 70321
     Document.prototype.selectSingleNode     =
70322 70322
     XMLDocument.prototype.selectSingleNode  =
70323 70323
     HTMLDocument.prototype.selectSingleNode = function(sExpr, contextNode){
70324  
-        var nodeList = this.selectNodes(sExpr + "[1]", contextNode ? contextNode : null);
  70324
+        var nodeList = this.selectNodes("(" + sExpr + ")[1]", contextNode ? contextNode : null);
70325 70325
         return nodeList.length > 0 ? nodeList[0] : null;
70326 70326
     };
70327 70327
     

0 notes on commit b616d51

Please sign in to comment.
Something went wrong with that request. Please try again.