mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Dropped more unused knockoutjs code
This commit is contained in:
parent
b79d9de1a0
commit
1d57a62ddd
14 changed files with 408 additions and 635 deletions
|
|
@ -6,18 +6,6 @@
|
|||
|
||||
ko.bindingHandlers = {};
|
||||
|
||||
// The following element types will not be recursed into during binding.
|
||||
var bindingDoesNotRecurseIntoElementTypes = {
|
||||
// Don't want bindings that operate on text nodes to mutate <script> and <textarea> contents,
|
||||
// because it's unexpected and a potential XSS issue.
|
||||
// Also bindings should not operate on <template> elements since this breaks in Internet Explorer
|
||||
// and because such elements' contents are always intended to be bound in a different context
|
||||
// from where they appear in the document.
|
||||
'script': true,
|
||||
'textarea': true,
|
||||
'template': true
|
||||
};
|
||||
|
||||
// Use an overridable method for retrieving binding handlers so that plugins may support dynamically created handlers
|
||||
ko['getBindingHandler'] = bindingKey => ko.bindingHandlers[bindingKey];
|
||||
|
||||
|
|
@ -326,7 +314,12 @@
|
|||
if (shouldApplyBindings)
|
||||
bindingContextForDescendants = applyBindingsToNodeInternal(nodeVerified, null, bindingContext)['bindingContextForDescendants'];
|
||||
|
||||
if (bindingContextForDescendants && !bindingDoesNotRecurseIntoElementTypes[ko.utils.tagNameLower(nodeVerified)]) {
|
||||
// Don't want bindings that operate on text nodes to mutate <script> and <textarea> contents,
|
||||
// because it's unexpected and a potential XSS issue.
|
||||
// Also bindings should not operate on <template> elements since this breaks in Internet Explorer
|
||||
// and because such elements' contents are always intended to be bound in a different context
|
||||
// from where they appear in the document.
|
||||
if (bindingContextForDescendants && nodeVerified.matches && !nodeVerified.matches('SCRIPT,TEXTAREA,TEMPLATE')) {
|
||||
applyBindingsToDescendantsInternal(bindingContextForDescendants, nodeVerified);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue