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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.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/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 83571d18cdcff9450cbba9db13d408c663464083..8d240427c81fa2b847d98bb74ed4034c512f9e00 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -22074,7 +22074,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,
@@ -22082,6 +22083,7 @@ class KeyboardEvent extends UIEvent {
if (view == null) {
view = window;
}
+ location ??= keyLocation ?? 1;
KeyboardEvent e = document._createEvent("KeyboardEvent");
e._initKeyboardEvent(type, canBubble, cancelable, view, "", location,
ctrlKey, altKey, shiftKey, metaKey);

Powered by Google App Engine
This is Rietveld 408576698