close

fun close()(source)

The Document.close() method finishes writing to a document, opened with Document.open().

MDN Reference