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

Unified Diff: tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate

Issue 2884713002: Add keyLocation to KeyboardEvent constructor for backwards compatibility (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate
diff --git a/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate b/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate
index 0d5ec436fe1c11a24bcba26f79fe361d400398a2..578b645926b4a946bac8b358549fe6af59202072 100644
--- a/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate
+++ b/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate
@@ -6,13 +6,20 @@ part of $LIBRARYNAME;
$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
- factory $CLASSNAME(String type,
- {Window view, bool canBubble: true, bool cancelable: true,
- int location: 1, bool ctrlKey: false,
- bool altKey: false, bool shiftKey: false, bool metaKey: false}) {
+ factory $CLASSNAME(String type, {
+ Window view,
+ bool canBubble: true,
+ bool cancelable: true,
+ int location,
+ int keyLocation, // Legacy alias for location
Jacob 2017/05/15 17:12:06 Nit: end comments with a period. Here and in the o
+ bool ctrlKey: false,
+ bool altKey: false,
+ bool shiftKey: false,
+ bool metaKey: false}) {
if (view == null) {
view = window;
}
+ location ??= keyLocation ?? 1;
final e = document._createEvent("KeyboardEvent");
e._initKeyboardEvent(type, canBubble, cancelable, view, "",
location, ctrlKey, altKey, shiftKey, metaKey);
« no previous file with comments | « tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698