Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/domain.js

Issue 30011555: Issue 7303 - Deprecate the use of String.prototype.substr() (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Feb. 19, 2019, 4:47 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/content/elemHideEmulation.js ('k') | lib/filterClasses.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/domain.js
===================================================================
--- a/lib/domain.js
+++ b/lib/domain.js
@@ -66,17 +66,17 @@
*/
function* suffixes(domain, includeBlank = false)
{
while (domain != "")
{
yield domain;
let dotIndex = domain.indexOf(".");
- domain = dotIndex == -1 ? "" : domain.substr(dotIndex + 1);
+ domain = dotIndex == -1 ? "" : domain.substring(dotIndex + 1);
}
if (includeBlank)
yield "";
}
exports.suffixes = suffixes;
« no previous file with comments | « lib/content/elemHideEmulation.js ('k') | lib/filterClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld