http://codereview.appspot.com/126062/diff/4001/3089
File src/com/google/caja/plugin/templates/SafeHtmlMaker.java (right):

http://codereview.appspot.com/126062/diff/4001/3089#newcode135
Line 135: * has only a few, shallowly nested {...@code <script>} nodes with
few siblings.
This documentation is great.  Thanks much.

http://codereview.appspot.com/126062/diff/4001/3089#newcode180
Line 180: quasiStmt("/*...@synthetic*/'placeholder';");
operator should appear at beginning of line.

TODO: Is the fact that this node is synthetic significant?
How can a string literal by synthetic?  Only Identifiers and
FunctionConstructors can be synthetic.

http://codereview.appspot.com/126062/diff/4001/3089#newcode364
Line 364: emitStatement(EMIT_STATIC_HTML_PLACEHOLDER);
Instead of emitting a placeholder, can we just emit the static HTML when
we're packaging stuff up?

So instead of modifying this class, can the stage that invokes this,
check the meta, and do
  if (meta.isOnlyJsEmitted) {
    String staticHtml = render(html);
    if (!"".equals(staticHtml)) {
      jobs.add("IMPORTS___.htmlEmitter___.emitStatic(...)")
    }
  } else {
    jobs.add(htmlJob);
  }

http://codereview.appspot.com/126062

Reply via email to