mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 09:27:03 +03:00
ko.utils.domNodeDisposal.addDisposeCallback to ko.addDisposeCallback
This commit is contained in:
parent
c744b83480
commit
4cd5774257
12 changed files with 111 additions and 113 deletions
14
vendors/knockout/src/virtualElements.js
vendored
14
vendors/knockout/src/virtualElements.js
vendored
|
|
@ -76,17 +76,15 @@
|
|||
ko.utils.setDomNodeChildren(node, childNodes);
|
||||
},
|
||||
|
||||
prepend: (containerNode, nodeToPrepend) => {
|
||||
// Start comments must always have a parent and at least one following sibling (the end comment)
|
||||
isStartComment(containerNode)
|
||||
? containerNode.nextSibling.before(nodeToPrepend)
|
||||
: containerNode.prepend(nodeToPrepend);
|
||||
},
|
||||
|
||||
insertAfter: (containerNode, nodeToInsert, insertAfterNode) => {
|
||||
insertAfterNode
|
||||
? insertAfterNode.after(nodeToInsert)
|
||||
: ko.virtualElements.prepend(containerNode, nodeToInsert);
|
||||
: (
|
||||
// Start comments must always have a parent and at least one following sibling (the end comment)
|
||||
isStartComment(containerNode)
|
||||
? containerNode.nextSibling.before(nodeToInsert)
|
||||
: containerNode.prepend(nodeToInsert)
|
||||
);
|
||||
},
|
||||
|
||||
firstChild: node => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue