【发布时间】:2013-06-27 16:32:40
【问题描述】:
当我调用 Twitter Bootstrap popover 时,我在使用 Firefox 而不是 webkit 浏览器时收到此错误。
NS_ERROR_XPC_BAD_CONVERT_JS: Could not convert JavaScript argument arg 0 [nsIDOMWindow.getComputedStyle] @ http://localhost/assets/thirdParty/jquery/jquery-1.8.3.js:6825
错误在jquery.js的6825行:
var computed = window.getComputedStyle( elem, null );
This post seems to address this question 但是当我尝试实施他们的解决方案(如下所示)时没有效果。该帖子已有 4 年历史,因此 jQuery 的版本不同,我认为可以解释为什么此解决方案不再有效。
if (elem == document) elem = document.body;
var computed = window.getComputedStyle( elem, null );
【问题讨论】:
标签: javascript jquery firefox twitter-bootstrap getcomputedstyle