mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 14:07:04 +03:00
knockout appendChild => append
and tested closure-compiler 0.2.12 but still broken for es6 mode
This commit is contained in:
parent
7713f459ac
commit
0f56c7d28f
11 changed files with 209 additions and 188 deletions
|
|
@ -3,12 +3,12 @@ var classesWrittenByBindingKey = '__ko__cssValue';
|
|||
// For details on the pattern for changing node classes
|
||||
// see: https://github.com/knockout/knockout/issues/1597
|
||||
function toggleDomNodeCssClass(node, classNames, shouldHaveClass) {
|
||||
if (classNames) {
|
||||
var addOrRemoveFn = shouldHaveClass ? 'add' : 'remove';
|
||||
classNames.split(/\s+/).forEach(function(className) {
|
||||
node.classList[addOrRemoveFn](className);
|
||||
});
|
||||
}
|
||||
if (classNames) {
|
||||
var addOrRemoveFn = shouldHaveClass ? 'add' : 'remove';
|
||||
classNames.split(/\s+/).forEach(function(className) {
|
||||
node.classList[addOrRemoveFn](className);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ko.bindingHandlers['class'] = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue