打开Web分析与Node.JS Web应用程序.获取错误'TypeError: doc is null'
Open Web Analytics with Node.JS web applicaiton. Getting Error 'TypeError: doc is null'
场景:对于运行在Node.js上的web应用程序,我们正在集成OpenWebAnalytics。
问题:在firebug中,它显示如下错误
TypeError: doc is null
[Break On This Error]
...dth?window.innerWidth:document.body.offsetWidth;viewport.height=window.innerHeig...
在文件中的第1 168行owa.tracker.combined.min.js
方法源代码:
getIframeDocument: function (iframe) {
var doc = null;
if (iframe.contentDocument) {
doc = iframe.contentDocument;
} else if (iframe.contentWindow && iframe.contentWindow.document) {
doc = iframe.contentWindow.document;
} else if (iframe.document) {
doc = iframe.document;
}
if (doc == null) {
OWA.debug("Document not found, append the parent element to the DOM before creating the IFrame");
}
doc.open(); // TypeError: doc is null
doc.close();
return doc;
}
问题:有谁知道这种问题的解决方案吗?
谢谢你的帮助在我的应用程序中配置开放web分析时,我遇到了同样的问题。问题可能是你在javascript片段
中提到的baseUrl例如:不正确的var owa_baseUrl = 'http://yourdomain/path/to/owa';
正确:var owa_baseUrl = 'http://yourdomain/path/to/owa/';
再次检查嵌入在html文件中的javascript片段
相关文章:
- Javascript:selenium Web驱动程序isDisplayed()不工作
- TypeError:无法读取属性'推'未定义的JavaScript
- 在Web应用程序中使用Highcharts javascript
- 未捕获的TypeError无法读取未定义的属性socialsharing
- WebDriverException:tinyMCE未在selenium Web driver java中定义
- 扩展SVGTextElement时出现Typescript Uncaught TypeError
- Selenium Web驱动程序和javascript
- Windows形成web浏览器控件和Javascript更改的DOM
- TypeError:在不兼容的接收器nodejs上调用了方法Uint8Array.length
- 如何将javascript事件从web浏览器wpf控件发送到wpf的c#代码
- TypeError:_this.store.getState在使用来自Redux的连接时不是函数
- Steam Web API:I'我不知道该如何处理这个看起来像哈希的url来生成图像
- 在调用speak之前预加载Web Speech API
- 如何在visualstudio中调试web api时编辑javascript文件
- gulp Iconify任务抛出错误TypeError:Path必须是字符串.收到false
- 是否存在React Native“;WEB代码安全防护”;
- 如何在Ionic Android中将Javascript注入到web视图中
- 将复杂对象从angular js传递到web api,它总是返回404
- 未捕获的TypeError: undefined不是函数.ASP中的JQuery验证.NET Web表单
- 打开Web分析与Node.JS Web应用程序.获取错误'TypeError: doc is null'