Recent Chrome Update breaks IE emulation

2014-04-09
2014-04-16
  • Todd Gochenour
    Todd Gochenour
    2014-04-09

    After latest Chrome update, Version 34.0.1847.116 m, I found that selectNodes() and selectSingleNode() are not defined in the Document object as returned by XMLHttpRequest.responseXML. The XMLDocument is already defined, so the logic in sarissa.js to set XMLDocument = Document doesn't fire. The solution is to duplicate the prototype functions in both Document and XMLDocument.

    I added these lines to sarissa_ieemu_xpath.js to fix this issue.

    if(XMLDocument !== Document) {
        Document.prototype.selectNodes = XMLDocument.prototype.selectNodes;
    }
    if(XMLDocument !== Document) {
        Document.prototype.selectSingleNode = XMLDocument.prototype.selectSingleNode;
    }
    
     
  • Hey Todd,

    Could you please provide a patch or even just commit the change? I'd be happy to grant rights for the latter, been very busy so would appreciate the help

     
  • Matt C. Wilson
    Matt C. Wilson
    2014-04-16

    Hi Emmanuil,

    Attached is a patched version of sarissa_ieemu_xpath.js. Tried to do this through SourceForge CVS but was having some trouble connecting.

     
  • kavun
    kavun
    2014-04-16

    This is a known issue with Chrome 34.0.1847.116 and will be fixed in the next release. (2-3 weeks based on their previous release cycles)

    https://code.google.com/p/chromium/issues/detail?id=350923#c48