mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 06:27:02 +03:00
Drop support for old browsers and some jQuery
This commit is contained in:
parent
091c4ec811
commit
d06fed09d6
38 changed files with 6137 additions and 872 deletions
|
|
@ -5,7 +5,7 @@
|
|||
var tagNameLower = ko.utils.tagNameLower(node);
|
||||
if (ko.components.isRegistered(tagNameLower)) {
|
||||
// Try to determine that this node can be considered a *custom* element; see https://github.com/knockout/knockout/issues/1603
|
||||
if (tagNameLower.indexOf('-') != -1 || ('' + node) == "[object HTMLUnknownElement]" || (ko.utils.ieVersion <= 8 && node.tagName === tagNameLower)) {
|
||||
if (tagNameLower.indexOf('-') != -1 || ('' + node) == "[object HTMLUnknownElement]") {
|
||||
return tagNameLower;
|
||||
}
|
||||
}
|
||||
|
|
@ -84,32 +84,4 @@
|
|||
return { '$raw': {} };
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// Compatibility code for older (pre-HTML5) IE browsers
|
||||
|
||||
if (ko.utils.ieVersion < 9) {
|
||||
// Whenever you preregister a component, enable it as a custom element in the current document
|
||||
ko.components['register'] = (function(originalFunction) {
|
||||
return function(componentName) {
|
||||
document.createElement(componentName); // Allows IE<9 to parse markup containing the custom element
|
||||
return originalFunction.apply(this, arguments);
|
||||
}
|
||||
})(ko.components['register']);
|
||||
|
||||
// Whenever you create a document fragment, enable all preregistered component names as custom elements
|
||||
// This is needed to make innerShiv/jQuery HTML parsing correctly handle the custom elements
|
||||
document.createDocumentFragment = (function(originalFunction) {
|
||||
return function() {
|
||||
var newDocFrag = originalFunction(),
|
||||
allComponents = ko.components._allRegisteredComponents;
|
||||
for (var componentName in allComponents) {
|
||||
if (Object.prototype.hasOwnProperty.call(allComponents, componentName)) {
|
||||
newDocFrag.createElement(componentName);
|
||||
}
|
||||
}
|
||||
return newDocFrag;
|
||||
};
|
||||
})(document.createDocumentFragment);
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue