正在寻找 FB.XFBML.parse 回调函数?
是否有一个回调函数(例如 onComplete)?我想显示一个装载机。
FB.XFBML.parse()
is there a callback function (e.g. onComplete) for this? I would like to display a loader.
FB.XFBML.parse()
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,第二个参数是回调函数。例如这应该有效:
Yes, the second parameter is the callback function. For example this should work:
同时解析整个页面
To parse the whole page by the same time
截至 2013 年,这不起作用。谷歌浏览器将有像按钮一样的“闪烁”,直到它最终为我呈现。该事件在渲染完成之前调用。
为了测试这一点,我尝试隐藏之前有类似按钮的容器(这工作正常)。
然后我测试在
function() { 中显示容器
的});
FB.XFBML.parse
,此时新加载的按钮看起来正在闪烁。仅在谷歌浏览器中存在此问题,但它证明它毕竟不像按钮至少在谷歌浏览器中完成了渲染。
As of 2013 this does not work. Google Chrome will have "blinking" like buttons until it is finally rendered for me. This event is called before rendering is done.
To test this I try to hide the container before which has the like buttons (this works fine).
Then I test to show the container in the
function() {
of the});
FB.XFBML.parse
, that's when it looks like the newly loaded buttons are blinking.Only having this issue in google chrome, but it proves that it's not after all like buttons have finished rendering in google chrome atleast.