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

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

Issue 12084033: Adding supported checks for touch event. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adding missing test file. Created 7 years, 11 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 5f23f73f4410c3403af038d492cb1d0f74ac6257..44b37d7a662363f6f47096b58c09eb30bc106eb4 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -22363,6 +22363,14 @@ class TouchEvent extends UIEvent native "*TouchEvent" {
@DocsEditable
void $dom_initTouchEvent(TouchList touches, TouchList targetTouches, TouchList changedTouches, String type, Window view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) native;
+
+ /// Checks if this type is supported on the current platform.
+ static bool get supported {
+ if (JS('bool', '"ontouchstart" in window')) {
+ return Event._isTypeSupported('TouchEvent');
+ }
+ return false;
+ }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | tools/dom/templates/html/impl/impl_TouchEvent.darttemplate » ('J')

Powered by Google App Engine
This is Rietveld 408576698