Skip to content

Commit

Permalink
Fix issue knockout#212 and update build
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveSanderson committed Nov 28, 2011
1 parent a6b39d7 commit ff6cb2d
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 84 deletions.
13 changes: 8 additions & 5 deletions build/output/knockout-latest.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,14 @@ ko.utils = new (function () {
},

outerHTML: function(node) {
// For IE and Chrome
var nativeOuterHtml = node.outerHTML;
if (typeof nativeOuterHtml == "string")
return nativeOuterHtml;

// For Chrome on non-text nodes
// (Although IE supports outerHTML, the way it formats HTML is inconsistent - sometimes closing </li> tags are omitted, sometimes not. That caused https://github.com/SteveSanderson/knockout/issues/212.)
if (ieVersion === undefined) {
var nativeOuterHtml = node.outerHTML;
if (typeof nativeOuterHtml == "string")
return nativeOuterHtml;
}

// Other browsers
var dummyContainer = window.document.createElement("div");
dummyContainer.appendChild(node.cloneNode(true));
Expand Down
Loading

0 comments on commit ff6cb2d

Please sign in to comment.