Skip to content

Commit

Permalink
fix parseHTML处理tr元素插入caption元素的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
RubyLouvre committed Nov 19, 2014
1 parent cb1549e commit d1d01ee
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
14 changes: 7 additions & 7 deletions avalon.js
Original file line number Diff line number Diff line change
Expand Up @@ -1706,13 +1706,13 @@
fixVML(el)
}
}
if (tag === "tr") {
for (els = wrapper.children, i = 0; el = els[i++]; ) {
// IE6-8,如果动态生成tr元素,必须会在后面添加早已废弃caption的标签,其nodeName,innerHTML都为""
if (el.nodeName === "") {
el.parentNode.removeChild(el)
i--
}
}
if (DOC.createStyleSheet && tag === "tr") {
for (els = wrapper.children, i = 0; el = els[i++]; ) {
// IE6-9,如果动态生成tr元素,必须会在后面添加早已废弃caption的标签,其nodeName,innerHTML都为""
if (el.nodeName === "") {
el.parentNode.removeChild(el)
i--
}
}
}
Expand Down
23 changes: 12 additions & 11 deletions avalon.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d1d01ee

Please sign in to comment.