0

Twitter Bootstrap popoverを呼び出すと、Webkit ブラウザーではなく Firefox を使用してこのエラーが発生します。

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 );

この投稿はこの質問に対処しているようですが、解決策(以下に示す)を実装しようとしても効果はありませんでした。投稿は 4 年前なので、jQuery のバージョンが異なり、このソリューションが機能しなくなった理由を説明できると思います。

if (elem == document) elem = document.body; 
var computed = window.getComputedStyle( elem, null );
4

1 に答える 1

0

私は自分の質問に答えました。問題は、ポップオーバー コンテンツがコメントで終わっていることです。したがって、これは機能しませんでした:

<div class="popover">
    some content
</div><!--popover-->

一方、これは:

<div class="popover">
    some content
</div>
于 2013-06-28T14:03:47.450 に答える