We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d920111 commit bb13f6dCopy full SHA for bb13f6d
javascript/atoms/locators/xpath.js
@@ -88,6 +88,11 @@ bot.locators.xpath.DEFAULT_RESOLVER_ = (function() {
88
bot.locators.xpath.evaluate_ = function(node, path, resultType) {
89
var doc = goog.dom.getOwnerDocument(node);
90
91
+ if (!doc.documentElement) {
92
+ // document is not loaded yet
93
+ return null;
94
+ }
95
+
96
// Let the wgxpath library be compiled away unless we are on IE or Android.
97
// TODO: Restrict this to just IE when we drop support for Froyo.
98
if (goog.userAgent.IE || goog.userAgent.product.ANDROID) {
0 commit comments