HtmlDocument.internal constructor

HtmlDocument.internal({
  1. required Window window,
  2. required String contentType,
  3. required bool filled,
  4. String? origin,
})

An internal constructor that's NOT part of "dart:html".

This API is not for public use. We may do backwards-incompatible changes.

If filled is true, returns document:

<doctype html>
<html>
<head></head>
<body></body>
</html>

Implementation

HtmlDocument.internal({
  required super.window,
  required super.contentType,
  required bool filled,
  super.origin,
}) : super._() {
  if (filled) {
    final docType = InternalDocumentType.internal(this, 'html');
    append(docType);
    final htmlElement = HtmlHtmlElement._(this);
    append(htmlElement);
    htmlElement.append(HeadElement._(this));
    htmlElement.append(BodyElement._(this));
  }
}