当 iframe 没有 src 时,Safari 会出现永无休止的加载消息
我正在使用 @rem 的 jQuery :visited 插件 来执行访问的操作页面上的链接。该插件的工作原理是创建一个不可见的 iframe、注入 HTML 源代码并比较链接的颜色以查看哪些链接已被访问。它工作完美。
我遇到的问题是,在 Safari 上,状态栏消息始终挂在“正在加载 (X-1) 个 X 项目”上 - 即它认为仍然有一些资源需要加载。我已经将范围缩小到这个插件,事实上它在 src 设置(或在本例中注入)之前将 IFRAME 元素附加到 BODY。
我尝试重新排列代码以在追加发生之前设置 src,但这会破坏插件的功能。
有人知道如何解决这个问题吗?这不是一个主要问题,因为该网站仍然运行良好,但这是一个恼人的故障,可能会让用户感到困惑。
I'm using @rem's jQuery :visited plugin to do something with visited links on a page. The plugin works by creating an invisible iframe, injecting the HTML source, and comparing the colour of links to see which have been visited. It works perfectly.
The problem I have is that on Safari, the status bar message always hangs on "Loading (X-1) of X items" - i.e. it thinks there is still some resource still needing to be loaded. I've narrowed it down to this plugin, and the fact that it attaches the IFRAME element to the BODY before the src is set (or injected in this case).
I've tried rearranging the code to set the src before the append happens, but that breaks the plugin's functionality.
Anyone have any ideas how to fix this issue? It's not a major issue as the site still functions perfectly well, but it's an annoying glitch that could be confusing to users.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试将 src 设置为
about:blank
Try setting the src to
about:blank