4 ms·
You can call js directly using dynamic. From the docs[1]: val document = js.Dynamic.global.document val playground = document.getElementById("playgroun
by jackcviers3 7y ago
You can call js directly using dynamic. From the docs[1]:
val document = js.Dynamic.global.document
val playground = document.getElementById("playground")
val newP = document.createElement("p")
newP.innerHTML = "Hello world! <i>-- DOM</i>"
playground.appendChild(newP)
1. http://ochrons.github.io/sjs2/doc/interoperability/calling_js.html#:~:targetText=Scala.js%20lets%20you%20call,is%20of%20type%20js.Dynamic%20 http://ochrons.github.io/sjs2/doc/interoperability/calling_j....