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

Unified Diff: lib/html/src/Device.dart

Issue 10905130: Adding IE support to browser prefixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removing test exceptions from html.status. Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | tests/html/cssstyledeclaration_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/src/Device.dart
diff --git a/lib/html/src/Device.dart b/lib/html/src/Device.dart
index 7d8d54e17b3606ada5ed24435e9096acfc21e915..3dc6649fe9b6cf6fc4ce80e1e75d84e2f21a4846 100644
--- a/lib/html/src/Device.dart
+++ b/lib/html/src/Device.dart
@@ -14,6 +14,16 @@ class _Device {
static String get userAgent() => window.navigator.userAgent;
/**
+ * Determines if the current device is running Opera.
+ */
+ static bool get isOpera() => userAgent.contains("Opera", 0);
+
+ /**
+ * Determines if the current device is running Internet Explorer.
+ */
+ static bool get isIE() => !isOpera && userAgent.contains("MSIE", 0);
+
+ /**
* Determines if the current device is running Firefox.
*/
static bool get isFirefox() => userAgent.contains("Firefox", 0);
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | tests/html/cssstyledeclaration_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698