mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
drop jQuery support completely from knockoutjs
This commit is contained in:
parent
06abbf0713
commit
1cd07955a2
5 changed files with 110 additions and 140 deletions
11
vendors/knockout/src/utils.domNodeDisposal.js
vendored
11
vendors/knockout/src/utils.domNodeDisposal.js
vendored
|
|
@ -28,9 +28,6 @@ ko.utils.domNodeDisposal = new (function () {
|
|||
// Erase the DOM data
|
||||
ko.utils.domData.clear(node);
|
||||
|
||||
// Perform cleanup needed by external libraries (currently only jQuery, but can be extended)
|
||||
ko.utils.domNodeDisposal["cleanExternalData"](node);
|
||||
|
||||
// Clear any immediate-child comment nodes, as these wouldn't have been found by
|
||||
// node.getElementsByTagName("*") in cleanNode() (comment nodes aren't elements)
|
||||
if (cleanableNodeTypesWithDescendants[node.nodeType]) {
|
||||
|
|
@ -86,14 +83,6 @@ ko.utils.domNodeDisposal = new (function () {
|
|||
ko.cleanNode(node);
|
||||
if (node.parentNode)
|
||||
node.parentNode.removeChild(node);
|
||||
},
|
||||
|
||||
'cleanExternalData' : function (node) {
|
||||
// Special support for jQuery here because it's so commonly used.
|
||||
// Many jQuery plugins (including jquery.tmpl) store data using jQuery's equivalent of domData
|
||||
// so notify it to tear down any resources associated with the node & descendants here.
|
||||
if (jQuery && jQuery['cleanData'])
|
||||
jQuery['cleanData']([node]);
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue