Skip to content

Commit

Permalink
Also apply equivalent setTextContent perf improvement to "options" bi…
Browse files Browse the repository at this point in the history
…nding
  • Loading branch information
SteveSanderson committed Dec 20, 2011
1 parent cfa9ac4 commit c42966c
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 50 deletions.
5 changes: 2 additions & 3 deletions build/output/knockout-latest.debug.js
Expand Up @@ -2150,9 +2150,8 @@ ko.bindingHandlers['options'] = {
optionText = optionValue; // Given no optionsText arg; use the data value itself
if ((optionText === null) || (optionText === undefined))
optionText = "";
optionText = ko.utils.unwrapObservable(optionText).toString();
typeof option.innerText == "string" ? option.innerText = optionText
: option.textContent = optionText;

ko.utils.setTextContent(option, optionText);

element.appendChild(option);
}
Expand Down

0 comments on commit c42966c

Please sign in to comment.