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 ebd275274c87905a1e328c61485b1a90a907c793..2a5ef1a363f2ea52876affc91a3aa83184ab0c3e 100644 |
--- a/sdk/lib/html/dart2js/html_dart2js.dart |
+++ b/sdk/lib/html/dart2js/html_dart2js.dart |
@@ -9778,6 +9778,17 @@ class HeadingElement extends Element native "*HTMLHeadingElement" { |
/// @domName History; @docsEditable true |
class History implements HistoryBase native "*History" { |
+ /** |
+ * Checks if the State APIs are supported on the current platform. |
+ * |
+ * See also: |
+ * |
+ * * [pushState] |
+ * * [replaceState] |
+ * * [state] |
+ */ |
+ static bool get supportsState => JS('bool', '!!window.history.pushState'); |
+ |
/// @domName History.length; @docsEditable true |
final int length; |
@@ -9797,9 +9808,11 @@ class History implements HistoryBase native "*History" { |
void go(int distance) native; |
/// @domName History.pushState; @docsEditable true |
+ @SupportedBrowser(SupportedBrowser.CHROME) @SupportedBrowser(SupportedBrowser.FIREFOX) @SupportedBrowser(SupportedBrowser.IE, '10') @SupportedBrowser(SupportedBrowser.SAFARI) |
void pushState(Object data, String title, [String url]) native; |
/// @domName History.replaceState; @docsEditable true |
+ @SupportedBrowser(SupportedBrowser.CHROME) @SupportedBrowser(SupportedBrowser.FIREFOX) @SupportedBrowser(SupportedBrowser.IE, '10') @SupportedBrowser(SupportedBrowser.SAFARI) |
void replaceState(Object data, String title, [String url]) native; |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |