mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 05:29:20 +03:00
KnockoutJS to ES2015/ES6
TODO: use the new Proxy for ko.observable
This commit is contained in:
parent
a0f8ac0dad
commit
72ed2b08b2
56 changed files with 941 additions and 1873 deletions
|
|
@ -6,7 +6,7 @@
|
|||
};
|
||||
|
||||
ko.utils.extend(ko.bindingProvider.prototype, {
|
||||
'nodeHasBindings': function(node) {
|
||||
'nodeHasBindings': node => {
|
||||
switch (node.nodeType) {
|
||||
case 1: // Element
|
||||
return node.getAttribute(defaultBindingAttributeName) != null
|
||||
|
|
@ -31,12 +31,12 @@
|
|||
|
||||
// The following function is only used internally by this default provider.
|
||||
// It's not part of the interface definition for a general binding provider.
|
||||
'getBindingsString': function(node, bindingContext) {
|
||||
'getBindingsString': (node, bindingContext) => {
|
||||
switch (node.nodeType) {
|
||||
case 1: return node.getAttribute(defaultBindingAttributeName); // Element
|
||||
case 8: return ko.virtualElements.virtualNodeBindingValue(node); // Comment node
|
||||
default: return null;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
// The following function is only used internally by this default provider.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue