Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: third_party/polymer/v1_0/components-chromium/iron-a11y-keys-behavior/iron-a11y-keys-behavior-extracted.js

Issue 1221923003: Update bower.json for Polymer elements and add PRESUBMIT.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 1
2 (function() { 2 (function() {
3 'use strict'; 3 'use strict';
4 4
5 /** 5 /**
6 * Chrome uses an older version of DOM Level 3 Keyboard Events 6 * Chrome uses an older version of DOM Level 3 Keyboard Events
7 * 7 *
8 * Most keys are labeled as text, but some are Unicode codepoints. 8 * Most keys are labeled as text, but some are Unicode codepoints.
9 * Values taken from: http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-200712 21/keyset.html#KeySet-Set 9 * Values taken from: http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-200712 21/keyset.html#KeySet-Set
10 */ 10 */
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 46: 'del', 75 46: 'del',
76 106: '*' 76 106: '*'
77 }; 77 };
78 78
79 /** 79 /**
80 * MODIFIER_KEYS maps the short name for modifier keys used in a key 80 * MODIFIER_KEYS maps the short name for modifier keys used in a key
81 * combo string to the property name that references those same keys 81 * combo string to the property name that references those same keys
82 * in a KeyboardEvent instance. 82 * in a KeyboardEvent instance.
83 */ 83 */
84 var MODIFIER_KEYS = { 84 var MODIFIER_KEYS = {
85 shift: 'shiftKey', 85 'shift': 'shiftKey',
86 ctrl: 'ctrlKey', 86 'ctrl': 'ctrlKey',
87 alt: 'altKey', 87 'alt': 'altKey',
88 meta: 'metaKey' 88 'meta': 'metaKey'
89 }; 89 };
90 90
91 /** 91 /**
92 * KeyboardEvent.key is mostly represented by printable character made by 92 * KeyboardEvent.key is mostly represented by printable character made by
93 * the keyboard, with unprintable keys labeled nicely. 93 * the keyboard, with unprintable keys labeled nicely.
94 * 94 *
95 * However, on OS X, Alt+char can make a Unicode character that follows an 95 * However, on OS X, Alt+char can make a Unicode character that follows an
96 * Apple-specific mapping. In this case, we 96 * Apple-specific mapping. In this case, we
97 * fall back to .keyCode. 97 * fall back to .keyCode.
98 */ 98 */
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 _triggerKeyHandler: function(keyCombo, handlerName, keyboardEvent) { 399 _triggerKeyHandler: function(keyCombo, handlerName, keyboardEvent) {
400 var detail = Object.create(keyCombo); 400 var detail = Object.create(keyCombo);
401 detail.keyboardEvent = keyboardEvent; 401 detail.keyboardEvent = keyboardEvent;
402 402
403 this[handlerName].call(this, new CustomEvent(keyCombo.event, { 403 this[handlerName].call(this, new CustomEvent(keyCombo.event, {
404 detail: detail 404 detail: detail
405 })); 405 }));
406 } 406 }
407 }; 407 };
408 })(); 408 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698