Skip to content

Commit

Permalink
将ms-if去掉的元素都移动head标签的avalon标签下
Browse files Browse the repository at this point in the history
  • Loading branch information
qincheng committed Oct 23, 2014
1 parent bbc04f3 commit 22ce6af
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 54 deletions.
3 changes: 2 additions & 1 deletion avalon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2561,6 +2561,7 @@
})

//这里的函数每当VM发生改变后,都会被执行(操作方为notifySubscribers)
var ifGroup = head.appendChild(document.createElement("avalon"))
var bindingExecutors = avalon.bindingExecutors = {
"attr": function(val, elem, data) {
var method = data.type,
Expand Down Expand Up @@ -2890,7 +2891,7 @@
var node = data.element = DOC.createComment("ms-if")
elem.parentNode.replaceChild(node, elem)
data.template = elem //元素节点
head.appendChild(elem)
ifGroup.appendChild(elem)
}
}
},
Expand Down
Loading

0 comments on commit 22ce6af

Please sign in to comment.