Facebook评论计数IE8 innerHTML错误 [英] Facebook comments count IE8 innerHTML error

查看:111
本文介绍了Facebook评论计数IE8 innerHTML错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Internet Explorer 8上,在有评论的页面上,计数标签如< fb:comments-count href =<%= item_url(@item)%>>< / fb:comments-count> ,Internet Explorer 8中将出现错误。

On Internet Explorer 8, on pages where there are comments count tags like <fb:comments-count href="<%= item_url(@item) %>"></fb:comments-count>, there will be error in Internet Explorer 8.


无法设置innerHTML :未知的运行时错误。

行:40,字符:327

http://connect.facebook.net/en_US/all.js

所有其他Facebook插件(

All other Facebook plugins (like button, comments box) works as expected.

推荐答案

我发现,Facebook命名空间声明必须在头等级

I found out that the facebook namespace declaration have to be at the head level.

我从

<html>
  <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object#">

<html xmlns:fb="http://ogp.me/ns/fb#">
  <head prefix="og: http://ogp.me/ns# object: http://ogp.me/ns/object#">

,错误消失。

正在遵循打开图表命名空间声明:带XMLNS或头部的HTML前缀?,但是use-prefix-all-the-way显然与ie8有一些问题。

I was following Open Graph namespace declaration: HTML with XMLNS or head prefix? but the use-prefix-all-the-way clearly has some issue with ie8.

更新

我意识到我也错误地使用< fb:comments-count> 标签,而我在所有其他地方使用了HTML5 < div class =fb-comments-count> 标签。

I realized that I am also at fault in using the <fb:comments-count> tag by mistake, while I was using the HTML5 <div class="fb-comments-count"> tag in all other places.

如果我按照原样离开命名空间声明,但使用正确的HTML5评论标签,那么错误也将消失。

If I leave the namespace declaration as it was, but use the correct HTML5 comments tag, then error will also disappear too.

这篇关于Facebook评论计数IE8 innerHTML错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆