mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 22:17:03 +03:00
Replace deprecated String.substr with String.slice
This commit is contained in:
parent
2719f08e26
commit
b98762dd68
17 changed files with 54 additions and 54 deletions
|
|
@ -6,7 +6,7 @@ ko.bindingHandlers['attr'] = {
|
|||
|
||||
// Find the namespace of this attribute, if any.
|
||||
var prefixLen = attrName.indexOf(':');
|
||||
var namespace = "lookupNamespaceURI" in element && prefixLen > 0 && element.lookupNamespaceURI(attrName.substr(0, prefixLen));
|
||||
var namespace = "lookupNamespaceURI" in element && prefixLen > 0 && element.lookupNamespaceURI(attrName.slice(0, prefixLen));
|
||||
|
||||
// To cover cases like "attr: { checked:someProp }", we want to remove the attribute entirely
|
||||
// when someProp is a "no value"-like value (strictly null, false, or undefined)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ ko.bindingHandlers['value'] = {
|
|||
elementValueBeforeEvent = ko.selectExtensions.readValue(element);
|
||||
setTimeout(valueUpdateHandler, 0);
|
||||
};
|
||||
eventName = eventName.substring(5);
|
||||
eventName = eventName.slice(5);
|
||||
}
|
||||
registerEventHandler(eventName, handler);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ ko.expressionRewriting = (() => {
|
|||
var match = toks[i-1].match(divisionLookBehind);
|
||||
if (match && !keywordRegexLookBehind[match[0]]) {
|
||||
// The slash is actually a division punctuator; re-parse the remainder of the string (not including the slash)
|
||||
str = str.substr(str.indexOf(tok) + 1);
|
||||
str = str.slice(str.indexOf(tok) + 1);
|
||||
toks = str.match(bindingToken);
|
||||
i = -1;
|
||||
// Continue with just the slash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue