Chromium Code Reviews| Index: frog/leg/frog_leg.dart |
| =================================================================== |
| --- frog/leg/frog_leg.dart (revision 4753) |
| +++ frog/leg/frog_leg.dart (working copy) |
| @@ -84,7 +84,20 @@ |
| cancel(message.toString(), node); |
| } |
| + Uri getUriOf(String fileName) { |
|
kasperl
2012/03/01 06:30:15
I would call this getUriFor because the file name
ngeoffray
2012/03/01 08:57:57
Done.
|
| + Uri cwd = new Uri(scheme: 'file', path: currentDirectory); |
| + return cwd.resolve(fileName); |
| + } |
| + |
| Script readScript(Uri uri, [ScriptTag node]) { |
| + String uriName = uri.toString(); |
| + if (uriName == 'dart:dom') { |
|
ahe
2012/02/29 17:35:27
Please add:
// TODO(ahe): Clean this up.
ngeoffray
2012/03/01 08:57:57
Done.
|
| + uri = getUriOf(io.join([legDirectory, '..', '..', |
| + 'client', 'dom', 'frog', 'dom_frog.dart'])); |
| + } else if (uriName == 'dart:html') { |
| + uri = getUriOf(io.join([legDirectory, '..', '..', |
| + 'client', 'html', 'frog', 'html_frog.dart'])); |
| + } |
| if (uri.scheme != 'file') cancel('cannot read $uri', node: node); |
| String text = ""; |
| try { |