内容流自动启动在 Firefox 中不起作用
我创建了一个带有内容流的测试轮播
http://www.invest-champagne-ardenne.fr /test-carousel
一切都很好,除了自动启动在 Firefox 中不起作用。
我已经寻找解决方案几个小时了,但我找不到它不起作用的原因。
你有什么想法吗?谢谢。
I have created a test carousel with contentflow
http://www.invest-champagne-ardenne.fr/test-carousel
Everything is fine except that the autostart does not work in firefox.
I have looked a solution for hours but i can't find the reason why it does not work.
Do you have any idea ? Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Web 控制台显示以下错误:
这来自方法
setAddOnConf
显然是在加载附加组件之前调用的。如果您查看加载项的加载方式:这里我们在
contentflow.js
中存在一个错误 - 这假设动态添加的脚本将在除 Internet Explorer 和基于 WebKit 之外的所有浏览器中同步加载浏览器。从 Firefox 4 开始,Firefox 不再这样做(请参阅 bug 591981 了解更多信息)更多细节)。最简单的修复:删除if
语句并为所有浏览器执行document.write()
。另一种选择是将async="false"
属性添加到动态插入的脚本中,但我不确定浏览器支持矩阵在这里是什么样子。Web Console shows the following error:
This is coming from method
setAddOnConf
which is apparently being called before the add-ons loaded. If you look at how the add-ons are being loaded:And here we have a bug in
contentflow.js
- this assumes that dynamically added scripts will load synchronously in all browsers but Internet Explorer and WebKit-based browsers. That's something that Firefox is no longer doing starting with Firefox 4 (see bug 591981 for more details). Simplest fix: remove theif
statement and dodocument.write()
for all browsers. The other option would be addingasync="false"
attribute to the dynamically inserted script, I'm not sure however what the browser support matrix looks like here.