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

Unified Diff: lib/keySelector.js

Issue 5462707926990848: Issue 1434 - Removed remaining non-standard JavaScript code from buildtools (Closed)
Patch Set: Rebased Created Dec. 16, 2015, noon
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
« lib/hooks.js ('K') | « lib/hooks.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/keySelector.js
===================================================================
--- a/lib/keySelector.js
+++ b/lib/keySelector.js
@@ -4,16 +4,13 @@
Cu.import("resource://gre/modules/Services.jsm");
-let validModifiers =
-{
- ACCEL: null,
- CTRL: "control",
- CONTROL: "control",
- SHIFT: "shift",
- ALT: "alt",
- META: "meta",
- __proto__: null
-};
+let validModifiers = Object.create(null);
+validModifiers.ACCEL = null;
+validModifiers.CTRL = "control";
+validModifiers.CONTROL = "control";
+validModifiers.SHIFT = "shift";
+validModifiers.ALT = "alt";
+validModifiers.META = "meta";
/**
* Sets the correct value of validModifiers.ACCEL.
@@ -66,7 +63,7 @@
if (!validModifiers.ACCEL)
initAccelKey();
- this._existingShortcuts = {__proto__: null};
+ this._existingShortcuts = Object.create(null);
let keys = window.document.getElementsByTagName("key");
for (let i = 0; i < keys.length; i++)
« lib/hooks.js ('K') | « lib/hooks.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld