commit cb7640a96a2ff19ba8f6e2526954f3b888f0f357
parent b266f1414a70f1b24f4198f77b898e513d734601
Author: Simon Kornblith <simon@simonster.com>
Date: Fri, 27 Jul 2012 18:47:35 -0400
ZU.xpath tweak for IE
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js
@@ -982,6 +982,11 @@ Zotero.Utilities = {
}
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
null);
} catch(e) {