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

Side by Side Diff: src/site/samples/notifications/example/notifications_sample.dart

Issue 30853002: Added several more HTML5 samples (Closed) Base URL: https://github.com/dart-lang/dartlang.org.git@master
Patch Set: Created 7 years, 2 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:
View unified diff | Download patch
OLDNEW
(Empty)
1 import "dart:async" as BB;import "dart:html" as h;class q{static const s="Chrom e";static const t="Safari";final n;final minimumVersion;const q(this.n,[this. minimumVersion]);}class u{const u();}class v{final name;const v(this.name);}cla ss AB{const AB();}const j=0;const k="http://www.blogger.com/img/icon_logo32.gif" ; l(){if(h.window.notifications.checkPermission()==j){i();}else{h.window.notific ations.requestPermission().then((CB)=>i);}} i(){new BB.Timer(const Duration(mill iseconds:1000),()=>m());} m(){var g=h.window.notifications.createNotification(k, "Hello World","You've been notified!");g.onDisplay.listen((o)=>print("notificati on.on.display"));g.onClose.listen((o)=>print("notification.on.close"));g.show(); } main(){h.query('#say-hello').onClick.listen((g)=>l());}
OLDNEW
« no previous file with comments | « src/site/samples/notifications/example/index.html ('k') | src/site/samples/notifications/example/notifications_sample.dart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698