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

Unified Diff: lib/src/codegen/html_codegen.dart

Issue 1587693002: Avoid parsing and then generating HTML for documents without Dart scripts. This is a fragile workar… (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/html_codegen.dart
diff --git a/lib/src/codegen/html_codegen.dart b/lib/src/codegen/html_codegen.dart
index 6c56220d83c3afe00f501aaf59d034699d2ede6f..739045ec871b6ddbb8fa2fb67a514374344a15ed 100644
--- a/lib/src/codegen/html_codegen.dart
+++ b/lib/src/codegen/html_codegen.dart
@@ -28,7 +28,7 @@ String generateEntryHtml(HtmlSourceNode root, AbstractCompiler compiler) {
var scripts = document.querySelectorAll('script[type="application/dart"]');
if (scripts.isEmpty) {
_log.warning('No <script type="application/dart"> found in ${root.uri}');
- return '${document.outerHtml}\n';
+ return root.contents;
Jennifer Messerly 2016/01/13 18:05:02 This could use a comment.
}
scripts.skip(1).forEach((s) {
// TODO(sigmund): allow more than one Dart script tags?
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698