为什么我得到这个无限循环?

这是我的代码 :

 Render Plugin $('#renderPI').click(function () { new TWTR.Widget({ version: 2, type: 'profile', rpp: 4, interval: 30000, width: 650, height: 202, theme: { shell: { background: '#7ee1fc', color: '#2e2e2e' }, tweets: { background: '#ffffff', color: '#949494', links: '#009ece' } }, features: { scrollbar: true, loop: false, vlive: false, hashtags: true, timestamp: true, avatars: false, behavior: 'all' } }).render().setUser('google').start(); }); 

当我尝试渲染Twitter Widget时,如果你检查JS控制台,你会看到奇怪的行为! 为什么? 我该如何解决?

编辑似乎问题仅在Firefox上? 我有大量的attempt to run compile-and-go script on a cleared scope消息attempt to run compile-and-go script on a cleared scope

twitter小部件使用document.write语句。 在加载的页面上执行document.write会清空文档因此错误 – 演示此处 。 我的两分钱:FireFox正在做正确的事。

解决方法是告诉TWTR小部件避免使用document.write,而是使用DOM操作。 只需创建一个空的DIV并将其id作为id参数传递给TWTR小部件 – 这里演示 。