import org.scalajs.dom import dom.document def appendP(target: dom.Node, text: String) = { val pNode = document.createElement("p") val textNode = document.createTextNode(text) pNode.appendChild(textNode) target.appendChild(pNode) }