Skip diff for cached, non-keyed nodes fix #1206
This commit is contained in:
parent
4b340ecd75
commit
b6bb63ff85
2 changed files with 20 additions and 2 deletions
|
|
@ -845,4 +845,22 @@ o.spec("updateNodes", function() {
|
|||
o(root.childNodes[0].nodeName).equals("A")
|
||||
o(root.childNodes[1].nodeName).equals("S")
|
||||
})
|
||||
o("cached, non-keyed nodes skip diff", function () {
|
||||
var onupdate = o.spy();
|
||||
var cached = {tag:"a", attrs:{onupdate: onupdate}}
|
||||
|
||||
render(root, cached)
|
||||
render(root, cached)
|
||||
|
||||
o(onupdate.callCount).equals(0)
|
||||
})
|
||||
o("cached, keyed nodes skip diff", function () {
|
||||
var onupdate = o.spy();
|
||||
var cached = {tag:"a", key:"a", attrs:{onupdate: onupdate}}
|
||||
|
||||
render(root, cached)
|
||||
render(root, cached)
|
||||
|
||||
o(onupdate.callCount).equals(0)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue