Questions tagged [scala.js]

Scala.js is a Scala to JavaScript compiler deemed production-ready as of version 0.6.0.

Scala.js compiles Scala code to JavaScript, allowing you to write your Web application entirely in Scala!

Noteworthy features:

  • Support all of Scala, modulo a few semantic differences
  • Very good interoperability with JavaScript code. For example, use jQuery and HTML5 from your Scala.js code, either in a typed or untyped way. Or create Scala.js objects and call their methods from JavaScript.
  • Integrated with sbt (including support for dependency management and incremental compilation)
  • Can be used with your favorite IDE for Scala
  • Generates Source Maps for a smooth debugging experience (step through your Scala code from within your browser supporting source maps)
  • Integrates Google Closure Compiler for producing minimal code for production.

Find out more at scala-js.org

845 questions
-1
votes
1 answer

binding.scala component to string conversion

I have a binding.scala component and a third party scalajs library that takes html string as input. How can the b.s component can be passed to the library method as an argument? Specifics: import com.thoughtworks.binding.Binding._ import…
mcku
  • 1,351
  • 12
  • 23
-1
votes
1 answer

scalajs with d3 facade giving errors

I'm working on this example in scalajs but getting error at val mm: js.Function2[Bin[Double], Double, Double] = { (x: Bin[Double], y: Double) => x.y } val yMax = d3.max(data, mm) d3.max does have only the method…
Curious
  • 921
  • 1
  • 9
  • 25
-1
votes
2 answers

Why can I not pickle my case classes? What should I do to solve this manually next time?

Edit 2: Observations and questions I am pretty sure along with the commenter below Justin that the problem is due to an errant build.sbt configuration. However, this is the first time I have seen an errant build.sbt configuration that literally…
tacos_tacos_tacos
  • 10,277
  • 11
  • 73
  • 126
-2
votes
1 answer

how to define global scope method with `.` in name

I am trying to define facade for : https://facebook.github.io/jest/docs/en/api.html#testonlyname-fn @JSGlobalScope @js.native object JestGlobal extends js.Object { def test(str: String, function: js.Function0[_]): Unit = js.native …
invariant
  • 8,758
  • 9
  • 47
  • 61
-4
votes
1 answer

Testing of click event fails

I am following the official tutorial of scala.js, and in the testing part there is some code like this: package tutorial.webapp import utest._ import org.scalajs.jquery.{JQuery, jQuery} object TutorialTest extends TestSuite { // Initialize…
qed
  • 22,298
  • 21
  • 125
  • 196
1 2 3
56
57