Skip to content

Commit

Permalink
优化性能
Browse files Browse the repository at this point in the history
  • Loading branch information
qincheng committed Nov 17, 2014
1 parent b375083 commit 8055bcc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
6 changes: 4 additions & 2 deletions avalon.js
Original file line number Diff line number Diff line change
Expand Up @@ -1694,9 +1694,10 @@
for (i = wrap[0]; i--; wrapper = wrapper.lastChild) {
}
if (!W3C) { //fix IE
for (els = avalon.slice(wrapper["getElementsByTagName"]("br")), i = 0; el = els[i++]; ) {
for (els = wrapper["getElementsByTagName"]("br"), i = 0; el = els[i++]; ) {
if (el.className && el.className === "msNoScope") {
el.parentNode.removeChild(el)
i--
}
}
for (els = wrapper.all, i = 0; el = els[i++]; ) { //fix VML
Expand All @@ -1705,10 +1706,11 @@
}
}
if (tag === "tr") {
for (els = avalon.slice(wrapper.children), i = 0; el = els[i++]; ) {
for (els = wrapper.children, i = 0; el = els[i++]; ) {
// IE6-8,如果动态生成tr元素,必须会在后面添加早已废弃caption的标签,其nodeName,innerHTML都为""
if (el.nodeName == "") {
el.parentNode.removeChild(el)
i--
}
}
}
Expand Down
21 changes: 10 additions & 11 deletions avalon.min.js

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

0 comments on commit 8055bcc

Please sign in to comment.