parameters: (output_file,
                                   load_sequence,
                                   title=None,
                                   flattened_js_url=None,
                                   extra_scripts=None,
                                   minify=False,
                                   report_sizes=False,
                                   output_html_head_and_body=True)
docstring: Writes a HTML file with the content of all modules in a load sequence.
  
    The load_sequence is a list of (HTML or JS) Module objects; the order that
    they're inserted into the file depends on their type and position in the load
    sequence.
docstring_summary: Writes a HTML file with the content of all modules in a load sequence.
docstring_tokens: Writes a HTML file with the content of all modules in a load sequence .
function: def GenerateStandaloneHTMLToFile(output_file,
                                   load_sequence,
                                   title=None,
                                   flattened_js_url=None,
                                   extra_scripts=None,
                                   minify=False,
                                   report_sizes=False,
                                   output_html_head_and_body=True):
    """Writes a HTML file with the content of all modules in a load sequence.
  
    The load_sequence is a list of (HTML or JS) Module objects; the order that
    they're inserted into the file depends on their type and position in the load
    sequence.
    """
    _AssertIsUTF8(output_file)
    extra_scripts = extra_scripts or []
  
    if output_html_head_and_body:
      output_file.write(
          '<!DOCTYPE html>\n'
          '<html>\n'
          '  <head i18n-values="dir:textdirection;">\n'
          '  <meta http-equiv="Content-Type" content="text/html;'
          'charset=utf-8">\n')
      if title:
        output_file.write('  <title>%s</title>\n  ' % title)
    else:
      assert title is None
  
    loader = load_sequence[0].loader
  
    written_style_sheets = set()
  
    class HTMLGenerationController(
        html_generation_controller.HTMLGenerationController):
  
      def __init__(self, module):
        self.module = module
  
      def GetHTMLForStylesheetHRef(self, href):
        resource = self.module.HRefToResource(
            href, '<link rel="stylesheet" href="%s">' % href)
        style_sheet = loader.LoadStyleSheet(resource.name)
  
        if style_sheet in written_style_sheets:
          return None
        written_style_sheets.add(style_sheet)
  
        text = style_sheet.contents_with_inlined_images
        if minify:
          text = _MinifyCSS(text)
        return '<style>\n%s\n</style>' % text
  
    for module in load_sequence:
      controller = HTMLGenerationController(module)
      module.AppendHTMLContentsToFile(output_file, controller, minify=minify)
  
    if flattened_js_url:
      output_file.write('<script src="%s"></script>\n' % flattened_js_url)
    else:
      output_file.write('<script>\n')
      js = GenerateJS(load_sequence, minify=minify, report_sizes=report_sizes)
      output_file.write(js)
      output_file.write('</script>\n')
  
    for extra_script in extra_scripts:
      extra_script.WriteToFile(output_file)
  
    if output_html_head_and_body:
      output_file.write('</head>\n  <body>\n  </body>\n</html>\n')
function_tokens: def GenerateStandaloneHTMLToFile ( output_file , load_sequence , title = None , flattened_js_url = None , extra_scripts = None , minify = False , report_sizes = False , output_html_head_and_body = True ) : _AssertIsUTF8 ( output_file ) extra_scripts = extra_scripts or [ ] if output_html_head_and_body : output_file . write ( '<!DOCTYPE html>\n' '<html>\n' '  <head i18n-values="dir:textdirection;">\n' '  <meta http-equiv="Content-Type" content="text/html;' 'charset=utf-8">\n' ) if title : output_file . write ( '  <title>%s</title>\n  ' % title ) else : assert title is None loader = load_sequence [ 0 ] . loader written_style_sheets = set ( ) class HTMLGenerationController ( html_generation_controller . HTMLGenerationController ) : def __init__ ( self , module ) : self . module = module def GetHTMLForStylesheetHRef ( self , href ) : resource = self . module . HRefToResource ( href , '<link rel="stylesheet" href="%s">' % href ) style_sheet = loader . LoadStyleSheet ( resource . name ) if style_sheet in written_style_sheets : return None written_style_sheets . add ( style_sheet ) text = style_sheet . contents_with_inlined_images if minify : text = _MinifyCSS ( text ) return '<style>\n%s\n</style>' % text for module in load_sequence : controller = HTMLGenerationController ( module ) module . AppendHTMLContentsToFile ( output_file , controller , minify = minify ) if flattened_js_url : output_file . write ( '<script src="%s"></script>\n' % flattened_js_url ) else : output_file . write ( '<script>\n' ) js = GenerateJS ( load_sequence , minify = minify , report_sizes = report_sizes ) output_file . write ( js ) output_file . write ( '</script>\n' ) for extra_script in extra_scripts : extra_script . WriteToFile ( output_file ) if output_html_head_and_body : output_file . write ( '</head>\n  <body>\n  </body>\n</html>\n' )