Skip to content

Commit

Permalink
Use lower case HTML tag names when forcing parsing via .innerHTML
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveSanderson committed Feb 13, 2011
1 parent 397e141 commit e67cbb3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions build/output/knockout-latest.debug.js
Expand Up @@ -1395,7 +1395,7 @@ ko.bindingHandlers['uniqueName'] = {

// Workaround IE 6 issue - http://www.matts411.com/post/setting_the_name_attribute_in_ie_dom/
if (ko.utils.isIe6)
element.mergeAttributes(document.createElement("<INPUT name='" + element.name + "'/>"), false);
element.mergeAttributes(document.createElement("<input name='" + element.name + "'/>"), false);
}
}
};
Expand Down Expand Up @@ -1454,13 +1454,13 @@ ko.bindingHandlers['checked'] = {

// Workaround for IE 6 bug - it fails to apply checked state to dynamically-created checkboxes if you merely say "element.checked = true"
if (value && ko.utils.isIe6)
element.mergeAttributes(document.createElement("<INPUT type='checkbox' checked='checked' />"), false);
element.mergeAttributes(document.createElement("<input type='checkbox' checked='checked' />"), false);
} else if (element.type == "radio") {
element.checked = (element.value == value);

// Workaround for IE 6/7 bug - it fails to apply checked state to dynamically-created radio buttons if you merely say "element.checked = true"
if ((element.value == value) && (ko.utils.isIe6 || ko.utils.isIe7))
element.mergeAttributes(document.createElement("<INPUT type='radio' checked='checked' />"), false);
element.mergeAttributes(document.createElement("<input type='radio' checked='checked' />"), false);
}
}
};
Expand Down
4 changes: 2 additions & 2 deletions build/output/knockout-latest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/binding/defaultBindings.js
Expand Up @@ -312,7 +312,7 @@ ko.bindingHandlers['uniqueName'] = {

// Workaround IE 6 issue - http://www.matts411.com/post/setting_the_name_attribute_in_ie_dom/
if (ko.utils.isIe6)
element.mergeAttributes(document.createElement("<INPUT name='" + element.name + "'/>"), false);
element.mergeAttributes(document.createElement("<input name='" + element.name + "'/>"), false);
}
}
};
Expand Down Expand Up @@ -371,13 +371,13 @@ ko.bindingHandlers['checked'] = {

// Workaround for IE 6 bug - it fails to apply checked state to dynamically-created checkboxes if you merely say "element.checked = true"
if (value && ko.utils.isIe6)
element.mergeAttributes(document.createElement("<INPUT type='checkbox' checked='checked' />"), false);
element.mergeAttributes(document.createElement("<input type='checkbox' checked='checked' />"), false);
} else if (element.type == "radio") {
element.checked = (element.value == value);

// Workaround for IE 6/7 bug - it fails to apply checked state to dynamically-created radio buttons if you merely say "element.checked = true"
if ((element.value == value) && (ko.utils.isIe6 || ko.utils.isIe7))
element.mergeAttributes(document.createElement("<INPUT type='radio' checked='checked' />"), false);
element.mergeAttributes(document.createElement("<input type='radio' checked='checked' />"), false);
}
}
};
Expand Down

0 comments on commit e67cbb3

Please sign in to comment.