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

Side by Side Diff: chrome/browser/resources/md_downloads/crisper.js

Issue 2059913002: Remove keyIdentifier usage in chrome/browser/resources/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chromeos build Created 4 years, 6 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 | « chrome/browser/resources/inspect/inspect.js ('k') | chrome/browser/resources/ntp4/apps_page.js » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 /** 5 /**
6 * @fileoverview Assertion support. 6 * @fileoverview Assertion support.
7 */ 7 */
8 8
9 /** 9 /**
10 * Verify |condition| is truthy and return |condition| if so. 10 * Verify |condition| is truthy and return |condition| if so.
(...skipping 4123 matching lines...) Expand 10 before | Expand all | Expand 10 after
4134 4134
4135 /** @this {ActionLink} */ 4135 /** @this {ActionLink} */
4136 createdCallback: function() { 4136 createdCallback: function() {
4137 // Action links can start disabled (e.g. <a is="action-link" disabled>). 4137 // Action links can start disabled (e.g. <a is="action-link" disabled>).
4138 this.tabIndex = this.disabled ? -1 : 0; 4138 this.tabIndex = this.disabled ? -1 : 0;
4139 4139
4140 if (!this.hasAttribute('role')) 4140 if (!this.hasAttribute('role'))
4141 this.setAttribute('role', 'link'); 4141 this.setAttribute('role', 'link');
4142 4142
4143 this.addEventListener('keydown', function(e) { 4143 this.addEventListener('keydown', function(e) {
4144 if (!this.disabled && e.keyIdentifier == 'Enter' && !this.href) { 4144 if (!this.disabled && e.key == 'Enter' && !this.href) {
4145 // Schedule a click asynchronously because other 'keydown' handlers 4145 // Schedule a click asynchronously because other 'keydown' handlers
4146 // may still run later (e.g. document.addEventListener('keydown')). 4146 // may still run later (e.g. document.addEventListener('keydown')).
4147 // Specifically options dialogs break when this timeout isn't here. 4147 // Specifically options dialogs break when this timeout isn't here.
4148 // NOTE: this affects the "trusted" state of the ensuing click. I 4148 // NOTE: this affects the "trusted" state of the ensuing click. I
4149 // haven't found anything that breaks because of this (yet). 4149 // haven't found anything that breaks because of this (yet).
4150 window.setTimeout(this.click.bind(this), 0); 4150 window.setTimeout(this.click.bind(this), 0);
4151 } 4151 }
4152 }); 4152 });
4153 4153
4154 function preventDefault(e) { 4154 function preventDefault(e) {
(...skipping 7333 matching lines...) Expand 10 before | Expand all | Expand 10 after
11488 Manager.updateItem = function(index, data) { 11488 Manager.updateItem = function(index, data) {
11489 Manager.get().updateItem_(index, data); 11489 Manager.get().updateItem_(index, data);
11490 }; 11490 };
11491 11491
11492 return {Manager: Manager}; 11492 return {Manager: Manager};
11493 }); 11493 });
11494 // Copyright 2015 The Chromium Authors. All rights reserved. 11494 // Copyright 2015 The Chromium Authors. All rights reserved.
11495 // Use of this source code is governed by a BSD-style license that can be 11495 // Use of this source code is governed by a BSD-style license that can be
11496 // found in the LICENSE file. 11496 // found in the LICENSE file.
11497 11497
11498 window.addEventListener('load', downloads.Manager.onLoad); 11498 window.addEventListener('load', downloads.Manager.onLoad);
OLDNEW
« no previous file with comments | « chrome/browser/resources/inspect/inspect.js ('k') | chrome/browser/resources/ntp4/apps_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698