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

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

Issue 11885031: Adding support checks for ApplicationCache. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 614cb9f318ad5c75f87c2370f6aca21179ec390d..9b0fefcf45a864742658abd8d94107b99cfbace5 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -213,6 +213,11 @@ class AppletElement extends Element native "*HTMLAppletElement" {
/// @domName DOMApplicationCache; @docsEditable true
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.FIREFOX)
+@SupportedBrowser(SupportedBrowser.IE, '10')
+@SupportedBrowser(SupportedBrowser.OPERA)
+@SupportedBrowser(SupportedBrowser.SAFARI)
class ApplicationCache extends EventTarget native "*DOMApplicationCache" {
static const EventStreamProvider<Event> cachedEvent = const EventStreamProvider<Event>('cached');
@@ -231,6 +236,9 @@ class ApplicationCache extends EventTarget native "*DOMApplicationCache" {
static const EventStreamProvider<Event> updateReadyEvent = const EventStreamProvider<Event>('updateready');
+ /// Checks if this type is supported on the current platform.
+ static bool get supported => JS('bool', '!!(window.applicationCache)');
+
/// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
ApplicationCacheEvents get on =>
new ApplicationCacheEvents(this);

Powered by Google App Engine
This is Rietveld 408576698