0

I'm getting this error using Firefox but not webkit browser when I invoke a Twitter Bootstrap popover.

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

The error is on line 6825 of jquery.js:

var computed = window.getComputedStyle( elem, null );

This post seems to address this question but when I tried implement their solution (shown below) that had no effect. The post is 4 years old so the version of jQuery is different and I'd think can explain why this solution no longer works.

if (elem == document) elem = document.body; 
var computed = window.getComputedStyle( elem, null );
tim peterson
  • 23,653
  • 59
  • 177
  • 299

1 Answers1

0

I answered my own question. The problem is that my popover content ended with a comment. So this didn't work:

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

whereas this did:

<div class="popover">
    some content
</div>
tim peterson
  • 23,653
  • 59
  • 177
  • 299