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: Turned knownClasses into a Set as well Created April 4, 2015, 3:28 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);

Powered by Google App Engine
This is Rietveld