htmlDocument

val htmlDocument: AtomicReference<Document?>

During page render, the initial HTML document will be available for modification as a JSoup Document in this AtomicReference.

Callers to callJsFunction may check for this being non-null, and if so edit the document instead of some or all of the JavaScript they must call.

The purpose of this is to implement Server-Side Rendering.