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

Side by Side Diff: ui/webui/resources/js/util.js

Issue 2586113002: MD Settings: ignore modified key events in the profile avatar grid (Closed)
Patch Set: closure Created 3 years, 12 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
« no previous file with comments | « ui/webui/resources/js/cr/ui/focus_row.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // <include src="assert.js"> 5 // <include src="assert.js">
6 6
7 /** 7 /**
8 * Alias for document.getElementById. Found elements must be HTMLElements. 8 * Alias for document.getElementById. Found elements must be HTMLElements.
9 * @param {string} id The ID of the element to find. 9 * @param {string} id The ID of the element to find.
10 * @return {HTMLElement} The found element or null if not found. 10 * @return {HTMLElement} The found element or null if not found.
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 * @param {!Array<string>} moduleNames 493 * @param {!Array<string>} moduleNames
494 * @return {!Promise} 494 * @return {!Promise}
495 */ 495 */
496 function importModules(moduleNames) { 496 function importModules(moduleNames) {
497 return new Promise(function(resolve) { 497 return new Promise(function(resolve) {
498 define(moduleNames, function() { 498 define(moduleNames, function() {
499 resolve(Array.from(arguments)); 499 resolve(Array.from(arguments));
500 }); 500 });
501 }); 501 });
502 } 502 }
503
504 /**
505 * @param {!Event} e
506 * @return {boolean} Whether a modifier key was down when processing |e|.
507 */
508 function hasKeyModifiers(e) {
509 return !!(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey);
510 }
OLDNEW
« no previous file with comments | « ui/webui/resources/js/cr/ui/focus_row.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698