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

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

Issue 11697011: Fixing up history test to pass properly on supported platforms. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698