This is a weird IE quirk. Here are the steps:
- Go to msn.com in Internet Explorer 8
- Pull up dev tools
- Switch Browser Mode to "IE8 Compat View"
- Switch Document Mode to "IE7 Standards"
- Switch to Script tab
- run the following script:
true.toJSON()
it returns true
. No other browser does this. It's giving me issues because it's causing the tooltip widget of jQueryUI to fail for IE because at some point it passes a boolean value of true
to $.isEmptyObject()
. Normally passing in true
would just return true
but since true
now has a method associated with it (toJSON
) it is returning false
and breaking the widget.
I noticed there are some sites (like Google) that you can try to do the same test and true.toJSON()
just breaks without returning anything. What is this weird toJSON
method and how do I get rid of it?