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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
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:
Download patch
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index fc6b7aaa14683ea8ecd512389c1f0010452becf8..f7c3b61b34766aff837a2645d4ce724b6123d000 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -24964,7 +24964,8 @@ class KeyboardEvent extends UIEvent {
{Window view,
bool canBubble: true,
bool cancelable: true,
- int location: 1,
+ int location,
+ int keyLocation, // Legacy alias for location
bool ctrlKey: false,
bool altKey: false,
bool shiftKey: false,
@@ -24972,6 +24973,7 @@ class KeyboardEvent extends UIEvent {
if (view == null) {
view = window;
}
+ location ??= keyLocation ?? 1;
final e = document._createEvent("KeyboardEvent");
e._initKeyboardEvent(type, canBubble, cancelable, view, "", location,
ctrlKey, altKey, shiftKey, metaKey);

Powered by Google App Engine
This is Rietveld 408576698