Is this doc out-dated? http://www.scala-js.org/doc/calling-javascript.html Can't seem to get this right in intellij:
import org.scalajs.dom.html
import org.scalajs.dom
import org.scalajs.dom.raw.HTMLElement
import scala.scalajs.js
import js.JSConverters._
import fr.iscpif.scaladget.d3._
import fr.iscpif.scaladget.mapping._
import scala.scalajs.js
import scala.scalajs.js.annotation.JSExport
import org.scalajs.jquery.jQuery
/**
* Created by IDEA on 31/10/15.
*/
@JSExport
object LearnD3 {
@JSExport
def main(div: html.Div): Unit = {
jQuery("#list > li").each((x, y) => y)
}
}
First dom.HTMLElement doesn't seem to exist. There is org.scalajs.dom.raw.HTMLElement
, but even if I import that there is a type mismatch: