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

Unified Diff: lib/aardvark.js

Issue 6520005931827200: Issue 2259 - Removed non-standard JavaScript code from Element Hiding Helper (Closed)
Patch Set: Created April 1, 2015, 3:16 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
Index: lib/aardvark.js
===================================================================
--- a/lib/aardvark.js
+++ b/lib/aardvark.js
@@ -7,7 +7,7 @@
let {Prefs} = require("prefs");
// Make sure to stop selection when we are uninstalled
-onShutdown.add(function() Aardvark.quit());
+onShutdown.add(() => Aardvark.quit());
// To be replaced when selection starts
function E(id) {return null;}
@@ -60,7 +60,7 @@
this.window = wrapper.window;
this.browser = wrapper.browser;
- E = function(id) wrapper.E(id);
+ E = id => wrapper.E(id);
this.browser.addEventListener("click", this.onMouseClick, true);
this.browser.addEventListener("DOMMouseScroll", this.onMouseScroll, true);
@@ -563,7 +563,7 @@
this.commentElem = null;
this.lockedAnchor = null;
this.boxElem = null;
- E = function(id) null;
+ E = id => null;
return false;
},
@@ -752,5 +752,5 @@
// Makes sure event handlers like Aardvark.onKeyPress always have the correct
// this pointer set.
-for each (let method in ["onMouseClick", "onMouseScroll", "onKeyPress", "onPageHide", "onMouseMove", "onAfterPaint", "quit"])
+for (let method of ["onMouseClick", "onMouseScroll", "onKeyPress", "onPageHide", "onMouseMove", "onAfterPaint", "quit"])
Aardvark[method] = Aardvark[method].bind(Aardvark);
« no previous file with comments | « chrome/content/composer.js ('k') | lib/inspectorObserver.js » ('j') | lib/main.js » ('J')

Powered by Google App Engine
This is Rietveld