+ if (title) {
+ const wrapper = document.createElement("article")
+ const details = wrapper.appendChild(document.createElement("details"))
+ details.setAttribute("open", "")
+ const summary = details.appendChild(document.createElement("summary"))
+ summary.textContent = title
+ details.append(...document.importNode(article, true).childNodes)
+ document.body.replaceChildren(header, wrapper, footer) }
+ else document.body.replaceChildren(header, document.importNode(article, true), footer) })