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

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

Issue 1002953005: Fix Notification (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed formatting of the test Created 5 years, 9 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') | 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 735b712df4db14ac6f9b68283678c5c578d89e9c..4584f01444ab92e517891c8cffa2152eb4667d9a 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -22684,17 +22684,18 @@ class NodeList extends Interceptor with ListMixin<Node>, ImmutableListMixin<Node
@Native("Notification")
class Notification extends EventTarget {
- factory Notification(String title, {String titleDir: null, String body: null,
- String bodyDir: null, String tag: null, String iconUrl: null}) {
+ factory Notification(String title, {String dir: null, String body: null,
+ String lang: null, String tag: null, String icon: null}) {
var parsedOptions = {};
- if (titleDir != null) parsedOptions['titleDir'] = titleDir;
+ if (dir != null) parsedOptions['dir'] = dir;
if (body != null) parsedOptions['body'] = body;
- if (bodyDir != null) parsedOptions['bodyDir'] = bodyDir;
+ if (lang != null) parsedOptions['lang'] = lang;
if (tag != null) parsedOptions['tag'] = tag;
- if (iconUrl != null) parsedOptions['iconUrl'] = iconUrl;
-
- return Notification._factoryNotification(title, parsedOptions);
+ if (icon != null) parsedOptions['icon'] = icon;
+ var nativeOptions;
+ nativeOptions = convertDartToNative_Dictionary(parsedOptions);
+ return Notification._factoryNotification(title, nativeOptions);
}
// To suppress missing implicit constructor warnings.
factory Notification._() { throw new UnsupportedError("Not supported"); }
@@ -22750,6 +22751,9 @@ class Notification extends EventTarget {
static Notification _create_1(title, options) => JS('Notification', 'new Notification(#,#)', title, options);
static Notification _create_2(title) => JS('Notification', 'new Notification(#)', title);
+ /// Checks if this type is supported on the current platform.
+ static bool get supported => JS('bool', '!!(window.Notification)');
+
@DomName('Notification.body')
@DocsEditable()
@Experimental() // untriaged
« 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