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

Side by Side Diff: src/site/samples/dndfiles/example/monitoring.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 AB;import "dart:html" as i;import "dart:math" as k;class l{static const m="Chrome";static const n="Firefox";static const o="Internet E xplorer";static const q="Safari";final j;final minimumVersion;const l(this.j, [this.minimumVersion]);}class s{const s();}class t{final name;const t(this.name );}class u{const u();}class v{var BB;var CB;var DB;v(){CB=i.query('#progress-bar ');BB=i.document.query('#files');BB.onChange.listen((g)=>EB());var h=i.query('#c ancel-read');h.onClick.listen((g)=>FB());} GB( g){g=k.min(100,k.max(0,g));CB.sty le.width='${g}%';CB.text='${g}%';if(g==0||g==100){new AB.Timer(const Duration(mi lliseconds:2000),()=>CB.classes.remove('loading'));}} EB(){GB(0);CB.classes.remo ve('loading');var h=BB.files[0];DB=new i.FileReader();DB.onError.listen((g)=>HB( ));DB.onProgress.listen(IB);DB.onAbort.listen((g)=>i.window.alert('File read can celled.'));DB.onLoadStart.listen((g)=>CB.classes.add('loading'));DB.onLoad.liste n((g)=>GB(100));DB.readAsBinaryString(h);} FB(){if(DB!=null){DB.abort();}} IB( g ){if(g.lengthComputable){var h=(100*g.loaded/g.total).round().toInt();GB(h);}} H B(){switch (DB.error.code){case i.FileError.NOT_FOUND_ERR:i.window.alert('File n ot found!');break;case i.FileError.NOT_READABLE_ERR:i.window.alert('File is not readable.');break;case i.FileError.ABORT_ERR:break;default:i.window.alert('An er ror occurred reading this file.');break;}}} main(){new v();}
OLDNEW
« no previous file with comments | « src/site/samples/dndfiles/example/index.html ('k') | src/site/samples/dndfiles/example/monitoring.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698