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

Side by Side Diff: sdk/lib/html/html_common/device.dart

Issue 23055008: Making almost all dom_ methods private. Exceptions will be addressed in a later CL. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of html_common; 5 part of html_common;
6 6
7 /** 7 /**
8 * Utils for device detection. 8 * Utils for device detection.
9 */ 9 */
10 class Device { 10 class Device {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 return _cachedPropertyPrefix; 98 return _cachedPropertyPrefix;
99 } 99 }
100 100
101 /** 101 /**
102 * Checks to see if the event class is supported by the current platform. 102 * Checks to see if the event class is supported by the current platform.
103 */ 103 */
104 static bool isEventTypeSupported(String eventType) { 104 static bool isEventTypeSupported(String eventType) {
105 // Browsers throw for unsupported event names. 105 // Browsers throw for unsupported event names.
106 try { 106 try {
107 var e = document.$dom_createEvent(eventType); 107 var e = new Event.eventType(eventType, '');
108 return e is Event; 108 return e is Event;
109 } catch (_) { } 109 } catch (_) { }
110 return false; 110 return false;
111 } 111 }
112 } 112 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698