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: 2nd argument to Utils.runAsync isn't necessary with arrow functions Created April 1, 2015, 5: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 | « no previous file | chrome/content/ui/filters.xul » ('j') | chrome/content/ui/sidebar.js » ('J')
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(this), false);
tschuster 2015/04/13 10:12:04 I think |this| here would be wrong. It's probably
Sebastian Noack 2015/04/13 10:22:04 Well spotted.
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.xul » ('j') | chrome/content/ui/sidebar.js » ('J')

Powered by Google App Engine
This is Rietveld