ZU.xpath tweak for IE
This commit is contained in:
parent
b266f1414a
commit
cb7640a96a
1 changed files with 5 additions and 0 deletions
|
@ -982,6 +982,11 @@ Zotero.Utilities = {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if(!rootDoc.evaluate && typeof installXPathIfNecessary !== undefined) {
|
||||||
|
// For IE: element.ownerDocument will not have an evaluate property,
|
||||||
|
// since this is provided by JavaScript-XPath
|
||||||
|
installXPathIfNecessary('defaultView' in rootDoc ? rootDoc.defaultView : rootDoc.parentWindow);
|
||||||
|
}
|
||||||
var xpathObject = rootDoc.evaluate(xpath, element, nsResolver, 5, // 5 = ORDERED_NODE_ITERATOR_TYPE
|
var xpathObject = rootDoc.evaluate(xpath, element, nsResolver, 5, // 5 = ORDERED_NODE_ITERATOR_TYPE
|
||||||
null);
|
null);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue