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

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

Issue 12326071: Adding supported checks and annotations to Crypto API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | sdk/lib/html/dartium/html_dartium.dart » ('J')
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 70641ad5c8303390291d33f02ccf2878826de60f..02ad6203bf070e064da1dbcc5ad2511fa6406028 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -1810,8 +1810,14 @@ class Counter native "*Counter" {
@DocsEditable
@DomName('Crypto')
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.SAFARI)
+@Experimental
class Crypto native "*Crypto" {
+ /// Checks if this type is supported on the current platform.
+ static bool get supported => JS('bool', '!!(window.crypto && window.crypto.getRandomValues)');
+
@DomName('Crypto.getRandomValues')
@DocsEditable
ArrayBufferView getRandomValues(ArrayBufferView array) native;
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | sdk/lib/html/dartium/html_dartium.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698