Chromium Code Reviews| Index: client/tools/htmlconverter.py |
| =================================================================== |
| --- client/tools/htmlconverter.py (revision 5935) |
| +++ client/tools/htmlconverter.py (working copy) |
| @@ -38,24 +38,12 @@ |
| $ cd %s/frog |
| $ ./tools/build.py -m release""") |
| -ENTRY_POINT_DOM = """ |
| +ENTRY_POINT = """ |
| #library('entry'); |
| -#import('dart:dom'); |
| #import('%s', prefix: 'original'); |
| -main() { |
| - window.addEventListener('DOMContentLoaded', (e) => original.main(), false); |
| -} |
| +main() => original.main(); |
|
vsm
2012/03/28 17:17:57
I think we can just get rid of this trampoline fil
kasperl
2012/03/28 17:56:29
I think the plan is to get rid of htmlconverter.py
|
| """ |
| -ENTRY_POINT_HTML = """ |
| -#library('entry'); |
| -#import('dart:html'); |
| -#import('%s', prefix: 'original'); |
| -main() { |
| - window.on.contentLoaded.add((e) => original.main()); |
| -} |
| -""" |
| - |
| CSS_TEMPLATE = '<style type="text/css">%s</style>' |
| CHROMIUM_SCRIPT_TEMPLATE = '<script type="application/javascript">%s</script>' |
| @@ -149,14 +137,9 @@ |
| f.write("#library('inlinedcode');\n") |
| f.write(body) |
| - if useDartHtml: |
| - entryPoint = ENTRY_POINT_HTML |
| - else: |
| - entryPoint = ENTRY_POINT_DOM |
| - |
| wrappedfile = join(indir, 'entry.dart') |
| with open(wrappedfile, 'w') as f: |
| - f.write(entryPoint % inputfile) |
| + f.write(ENTRY_POINT % inputfile) |
| status, out, err = execute(self.compileCommand(wrappedfile, outdir), |
| self.verbose) |