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

Unified Diff: chrome/content/ui/composer.js

Issue 4884233277407232: Issue 2257 - Replaced non-standard function expressions with ES6 arrow functions (Closed)
Patch Set: Rebased Created May 6, 2015, 10:46 a.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 | « no previous file | chrome/content/ui/filters-backup.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/ui/composer.js
===================================================================
--- a/chrome/content/ui/composer.js
+++ b/chrome/content/ui/composer.js
@@ -162,7 +162,7 @@
if (item.type == type)
typeNode.setAttribute("disabled", "true");
- typeNode.addEventListener("command", function() checkboxUpdated(this), false);
+ typeNode.addEventListener("command", () => checkboxUpdated(typeNode), false);
typeGroup.appendChild(typeNode);
}
@@ -255,8 +255,8 @@
if (options.length)
{
- options.sort(function(a, b) a[0] - b[0]);
- filter += "$" + options.map(function(o) o[1]).join(",");
+ options.sort((a, b) => a[0] - b[0]);
+ filter += "$" + options.map(o => o[1]).join(",");
}
}
else
« no previous file with comments | « no previous file | chrome/content/ui/filters-backup.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld