We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c61ec2 commit e485417Copy full SHA for e485417
example/src/main/scala/io/udash/demos/jquery/Init.scala
@@ -1,24 +1,13 @@
1
package io.udash.demos.jquery
2
3
import io.udash.demos.jquery.views.IndexView
4
-import io.udash.wrappers.jquery._
5
import org.scalajs.dom
6
-import org.scalajs.dom.Element
7
8
import scala.scalajs.js.annotation.JSExport
9
10
object Init {
11
12
@JSExport
13
- def main(args: Array[String]): Unit = {
14
- jQ((_: Element) => {
15
- val appRoot = jQ("#application").get(0)
16
- if (appRoot.isEmpty) {
17
- dom.console.error("Application root element not found! Check you index.html file!")
18
- } else {
19
- appRoot.get.appendChild(IndexView.content.render)
20
- //applicationInstance.run(appRoot.get)
21
- }
22
- })
23
+ def main(args: Array[String]): Unit =
+ dom.document.querySelector("#application").appendChild(IndexView.content.render)
24
}
0 commit comments