code: public static void writeScriptBlock(ServletRequest req, AbstractRenderAppender results, String script)
      {
          assert(results != null);
          ScriptTag.State state = new ScriptTag.State();
          state.suppressComments = false;
          ScriptTag br = (ScriptTag) TagRenderingBase.Factory.getRendering(TagRenderingBase.SCRIPT_TAG, req);
  
          results.append("\n");
          br.doStartTag(results, state);
          results.append(script);
          br.doEndTag(results, false);
          results.append("\n");
      }
docs: This is a static method that will write a consistent look/feel to the
  tags and comment markup that appears around the JavaScript.
  @param results the InternalStringBuilder that will have the &lt;script>
  tag written into
  @param script  the JavaScript block