Complete the Subpage.open() method
This commit is contained in:
parent
b72440dc82
commit
70a356208d
|
@ -12,5 +12,8 @@ data class Subpage(
|
||||||
val meta: Set<HTMLMetaElement>?,
|
val meta: Set<HTMLMetaElement>?,
|
||||||
val content: HTMLElement
|
val content: HTMLElement
|
||||||
) {
|
) {
|
||||||
fun open(): Document = window.document.open(type = "text/html", replace = content.innerHTML)
|
fun open(): Document = window.document.open(
|
||||||
|
type = "text/html",
|
||||||
|
replace = head.map { it.innerHTML }.reduce { previous, current -> previous + "\n" + current }
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue