render method

void render(
  1. Document document,
  2. CodeBuffer buffer,
  3. SymbolTable scope, {
  4. bool strictResolution = true,
})

Renders a document into the buffer as HTML.

If strictResolution is false (default: true), then undefined identifiers will return null instead of throwing.

Implementation

void render(Document document, CodeBuffer buffer, SymbolTable scope,
    {bool strictResolution = true}) {
  scope.create('!strict!', value: strictResolution != false);

  if (document.doctype != null) buffer.writeln(document.doctype!.span.text);
  renderElement(
      document.root, buffer, scope, document.doctype?.public == null);
}