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++) |