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

Side by Side Diff: appengine/chromium_rietveld/new_static/common/cr-keyboard.html

Issue 1001723003: Create a common directory of widgets and css. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 5 years, 9 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 <!-- Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 <!-- Copyright (c) 2014 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 Use to add keyboard shortcuts to your components. The last inserted componen t 6 Use to add keyboard shortcuts to your components. The last inserted componen t
7 will always receive the events (and others will not). This prevents the 7 will always receive the events (and others will not). This prevents the
8 common bug where you have two listeners and multiple actions are taken for 8 common bug where you have two listeners and multiple actions are taken for
9 the same keyboard shortcut. 9 the same keyboard shortcut.
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 return instance.isActive() && instance.hasAttribute("on-key-" + key); 130 return instance.isActive() && instance.hasAttribute("on-key-" + key);
131 }); 131 });
132 if (instance && instance.fire("key-" + key, event).defaultPrevented) 132 if (instance && instance.fire("key-" + key, event).defaultPrevented)
133 event.preventDefault(); 133 event.preventDefault();
134 } 134 }
135 135
136 window.addEventListener("keydown", handleKeyDown); 136 window.addEventListener("keydown", handleKeyDown);
137 })(); 137 })();
138 </script> 138 </script>
139 </polymer-element> 139 </polymer-element>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698