mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-11-03 02:48:49 +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
|
|
@ -1,11 +1,10 @@
|
|||
ko.bindingHandlers['text'] = {
|
||||
'init': function() {
|
||||
'init': () => {
|
||||
// Prevent binding on the dynamically-injected text node (as developers are unlikely to expect that, and it has security implications).
|
||||
// It should also make things faster, as we no longer have to consider whether the text node might be bindable.
|
||||
return { 'controlsDescendantBindings': true };
|
||||
},
|
||||
'update': function (element, valueAccessor) {
|
||||
ko.utils.setTextContent(element, valueAccessor());
|
||||
}
|
||||
'update': (element, valueAccessor) =>
|
||||
ko.utils.setTextContent(element, valueAccessor())
|
||||
};
|
||||
ko.virtualElements.allowedBindings['text'] = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue