Skip to content

Commit

Permalink
Bump version to 2.2.1 and rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveSanderson committed Jan 15, 2013
1 parent 1092926 commit 083b753
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 100 deletions.
2 changes: 1 addition & 1 deletion build/fragments/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.0
2.2.1
42 changes: 24 additions & 18 deletions build/output/knockout-latest.debug.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Knockout JavaScript library v2.2.0
// Knockout JavaScript library v2.2.1
// (c) Steven Sanderson - http://knockoutjs.com/
// License: MIT (http://www.opensource.org/licenses/mit-license.php)

Expand Down Expand Up @@ -37,7 +37,7 @@ ko.exportSymbol = function(koPath, object) {
ko.exportProperty = function(owner, publicName, object) {
owner[publicName] = object;
};
ko.version = "2.2.0";
ko.version = "2.2.1";

ko.exportSymbol('version', ko.version);
ko.utils = new (function () {
Expand Down Expand Up @@ -703,22 +703,28 @@ ko.exportSymbol('utils.domNodeDisposal.removeDisposeCallback', ko.utils.domNodeD
}

function jQueryHtmlParse(html) {
var elems = jQuery['clean']([html]);

// As of jQuery 1.7.1, jQuery parses the HTML by appending it to some dummy parent nodes held in an in-memory document fragment.
// Unfortunately, it never clears the dummy parent nodes from the document fragment, so it leaks memory over time.
// Fix this by finding the top-most dummy parent element, and detaching it from its owner fragment.
if (elems && elems[0]) {
// Find the top-most parent element that's a direct child of a document fragment
var elem = elems[0];
while (elem.parentNode && elem.parentNode.nodeType !== 11 /* i.e., DocumentFragment */)
elem = elem.parentNode;
// ... then detach it
if (elem.parentNode)
elem.parentNode.removeChild(elem);
}

return elems;
// jQuery's "parseHTML" function was introduced in jQuery 1.8.0 and is a documented public API.
if (jQuery['parseHTML']) {
return jQuery['parseHTML'](html);
} else {
// For jQuery < 1.8.0, we fall back on the undocumented internal "clean" function.
var elems = jQuery['clean']([html]);

// As of jQuery 1.7.1, jQuery parses the HTML by appending it to some dummy parent nodes held in an in-memory document fragment.
// Unfortunately, it never clears the dummy parent nodes from the document fragment, so it leaks memory over time.
// Fix this by finding the top-most dummy parent element, and detaching it from its owner fragment.
if (elems && elems[0]) {
// Find the top-most parent element that's a direct child of a document fragment
var elem = elems[0];
while (elem.parentNode && elem.parentNode.nodeType !== 11 /* i.e., DocumentFragment */)
elem = elem.parentNode;
// ... then detach it
if (elem.parentNode)
elem.parentNode.removeChild(elem);
}

return elems;
}
}

ko.utils.parseHtmlFragment = function(html) {
Expand Down
Loading

0 comments on commit 083b753

Please sign in to comment.