Error in Internet Explorer 9 (not earlier versions or other browsers) when including jQuery in an iframe

前端 未结 4 1714
灰色年华
灰色年华 2021-01-11 18:46

Basically I have a page that launched a fancybox iframe. In that iframe I also include jQuery. But when I testing it in Internet Explorer 9 it gives me the error <

4条回答
  •  死守一世寂寞
    2021-01-11 19:11

    I had the EXACT same issue, but the cause of mine was different. I figured I'd share here in case others were in the same boat as me - especially given that it took me about 4 hours to track down...

    Our main page had an iframe which ended up having its src attribute changed twice in a very short amount of time (we were actually loading the same src twice by accident - once directly in the HTML and then again on page load via JavaScript). I'm not sure why Internet Explorer 9 chokes, but I'm guessing that the frame was partially through initializing its scripts when the src was set again, putting the JavaScript engine into an unhappy state. Either way I'm glad I found it, since we shouldn't have been loading the frame twice!

    However, the real reason why Internet Explorer 9 died so bad is a mystery.

提交回复
热议问题