Drop support for old browsers and some jQuery

This commit is contained in:
djmaze 2020-09-17 16:40:43 +02:00
parent 091c4ec811
commit d06fed09d6
38 changed files with 6137 additions and 872 deletions

View file

@ -10,9 +10,7 @@
case 'option':
if (element[hasDomDataExpandoProperty] === true)
return ko.utils.domData.get(element, ko.bindingHandlers.options.optionValueDomDataKey);
return ko.utils.ieVersion <= 7
? (element.getAttributeNode('value') && element.getAttributeNode('value').specified ? element.value : element.text)
: element.value;
return element.value;
case 'select':
return element.selectedIndex >= 0 ? ko.selectExtensions.readValue(element.options[element.selectedIndex]) : undefined;
default:
@ -53,14 +51,6 @@
}
if (allowUnset || selection >= 0 || (value === undefined && element.size > 1)) {
element.selectedIndex = selection;
if (ko.utils.ieVersion === 6) {
// Workaround for IE6 bug: It won't reliably apply values to SELECT nodes during the same execution thread
// right after you've changed the set of OPTION nodes on it. So for that node type, we'll schedule a second thread
// to apply the value as well.
ko.utils.setTimeout(function () {
element.selectedIndex = selection;
}, 0);
}
}
break;
default: