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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 2242203002: record that Gamepad.buttons creates GamepadButtons (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add test Created 4 years, 4 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
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3b0de9d9176b19ccf929f2f952a3fafcabbbde37..c26229db08c4dee31e0d20295c8e0cff1ed40c7a 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -17673,6 +17673,8 @@ class Gamepad extends Interceptor {
@DomName('Gamepad.buttons')
@DocsEditable()
+ @Creates('JSExtendableArray|GamepadButton')
+ @Returns('JSExtendableArray')
final List<GamepadButton> buttons;
@DomName('Gamepad.connected')
@@ -37900,7 +37902,7 @@ class _GamepadList extends Interceptor with ListMixin<Gamepad>, ImmutableListMix
if (JS("bool", "# >>> 0 !== # || # >= #", index,
index, index, length))
throw new RangeError.index(index, this);
- return JS("Gamepad", "#[#]", this, index);
+ return JS("Gamepad|Null", "#[#]", this, index);
}
void operator[]=(int index, Gamepad value) {
throw new UnsupportedError("Cannot assign element of immutable List.");
@@ -37915,7 +37917,7 @@ class _GamepadList extends Interceptor with ListMixin<Gamepad>, ImmutableListMix
Gamepad get first {
if (this.length > 0) {
- return JS('Gamepad', '#[0]', this);
+ return JS('Gamepad|Null', '#[0]', this);
}
throw new StateError("No elements");
}
@@ -37923,7 +37925,7 @@ class _GamepadList extends Interceptor with ListMixin<Gamepad>, ImmutableListMix
Gamepad get last {
int len = this.length;
if (len > 0) {
- return JS('Gamepad', '#[#]', this, len - 1);
+ return JS('Gamepad|Null', '#[#]', this, len - 1);
}
throw new StateError("No elements");
}
@@ -37931,7 +37933,7 @@ class _GamepadList extends Interceptor with ListMixin<Gamepad>, ImmutableListMix
Gamepad get single {
int len = this.length;
if (len == 1) {
- return JS('Gamepad', '#[0]', this);
+ return JS('Gamepad|Null', '#[0]', this);
}
if (len == 0) throw new StateError("No elements");
throw new StateError("More than one element");
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698