From 2e96a64e85e852d58000054efd63837907c37971 Mon Sep 17 00:00:00 2001 From: RubyLouvre Date: Wed, 19 Nov 2014 18:31:23 +0800 Subject: [PATCH] update 1.3.7.2 --- avalon.js | 2 +- avalon.modern.js | 2 +- avalon.observe.js | 16 +++++++--------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/avalon.js b/avalon.js index d0957d311..106ec278b 100644 --- a/avalon.js +++ b/avalon.js @@ -5,7 +5,7 @@ http://weibo.com/jslouvre/ Released under the MIT license - avalon 1.3.7 2014.11.17 support IE6+ and other browsers + avalon 1.3.7.2 2014.11.19 support IE6+ and other browsers ==================================================*/ (function(DOC) { /********************************************************************* diff --git a/avalon.modern.js b/avalon.modern.js index 8d79fb520..e8c6c2ee4 100644 --- a/avalon.modern.js +++ b/avalon.modern.js @@ -5,7 +5,7 @@ http://weibo.com/jslouvre/ Released under the MIT license - avalon 1.3.7 2014.11.17 support IE10 and other latest browsers + avalon 1.3.7.2 2014.11.19 support IE10 and other latest browsers ==================================================*/ (function(DOC) { var expose = Date.now() diff --git a/avalon.observe.js b/avalon.observe.js index d639cd18e..82b835147 100644 --- a/avalon.observe.js +++ b/avalon.observe.js @@ -960,7 +960,6 @@ var rxhtml = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig var tagHooks = { - col: [2, "", "
"], g: [1, '', ''], //IE6-8在用innerHTML生成节点时,不能直接创建no-scope元素与HTML5的新标签 _default: [0, "", ""] //div可以不用闭合 @@ -978,14 +977,13 @@ t.innerHTML = wrap[1] + html + wrap[2] var wrapper = t.content if (wrap[0]) { - console.log(wrapper) -// var fragment = wrapper.cloneNode(false), firstChild -// for (var i = wrap[0]; i--; wrapper = wrapper.lastChild) { -// } -// while (firstChild = wrapper.firstChild) { // 将wrapper上的节点转移到文档碎片上! -// fragment.appendChild(firstChild) -// } -// return fragment + var fragment = wrapper.cloneNode(false), firstChild + for (var i = wrap[0]; i--; wrapper = wrapper.lastChild) { + } + while (firstChild = wrapper.firstChild) { // 将wrapper上的节点转移到文档碎片上! + fragment.appendChild(firstChild) + } + return fragment } return wrapper }