Skip to content

Commit e485417

Browse files
committed
Simplified init
1 parent 0c61ec2 commit e485417

File tree

1 file changed

+2
-13
lines changed
  • example/src/main/scala/io/udash/demos/jquery

1 file changed

+2
-13
lines changed
Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
11
package io.udash.demos.jquery
22

33
import io.udash.demos.jquery.views.IndexView
4-
import io.udash.wrappers.jquery._
54
import org.scalajs.dom
6-
import org.scalajs.dom.Element
75

86
import scala.scalajs.js.annotation.JSExport
97

108
object Init {
119

1210
@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-
}
11+
def main(args: Array[String]): Unit =
12+
dom.document.querySelector("#application").appendChild(IndexView.content.render)
2413
}

0 commit comments

Comments
 (0)