knockout appendChild => append

and tested closure-compiler 0.2.12 but still broken for es6 mode
This commit is contained in:
djmaze 2020-09-17 21:34:38 +02:00
parent 7713f459ac
commit 0f56c7d28f
11 changed files with 209 additions and 188 deletions

View file

@ -1,14 +1,14 @@
(function() {
function addOrRemoveItem(array, value, included) {
var existingEntryIndex = ko.utils.arrayIndexOf(ko.utils.peekObservable(array), value);
if (existingEntryIndex < 0) {
if (included)
array.push(value);
} else {
if (!included)
array.splice(existingEntryIndex, 1);
}
var existingEntryIndex = ko.utils.arrayIndexOf(ko.utils.peekObservable(array), value);
if (existingEntryIndex < 0) {
if (included)
array.push(value);
} else {
if (!included)
array.splice(existingEntryIndex, 1);
}
}
ko.bindingHandlers['checked'] = {