Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
346 views

In this project: https://github.com/tribbloid/scalajs-cli-demo I defined a scalajs project using a combination of npm and sbt, inside npm package file I declare sbt as a prepublish script: "...
tribbloid's user avatar
  • 3,832
4 votes
0 answers
113 views

I'm writing a scala library that can be compiled into both JVM bytebodes and javascript minified npm package (through scalajs). It will be released on both maven central and npm public repositories, ...
tribbloid's user avatar
  • 3,832
8 votes
2 answers
10k views

I am using Leaflet with scalajs-leaflet facade on Binding.scala, and the map initializes/appears incorrectly. In order to reproduce the issue, i have prepared a lihaoyi/workbench page similar to ...
mcku's user avatar
  • 1,443
0 votes
1 answer
115 views

In my project I use Scala.rx 0.3.2. When I upgraded to version 0.4.0 - without changing any code - I suddenly get a lot of LinkingErrors for even simple code like: private val pageVisibility: Var[...
Florian Baierl's user avatar
0 votes
1 answer
268 views

I am writing a little "fun" Scala/Scala.js project. On my server I have Entities which are referenced by uuid-s (inside Ref-s). For the sake of "fun", I don't want to use flux/redux architecture ...
jhegedus's user avatar
  • 20.8k
1 vote
1 answer
382 views

I want to define a checkbox in Binding.scala, like: <input type="checkbox" checked={elem.checked} /> elem.checked can have any String value (even an empty):the ...
pme's user avatar
  • 14.9k
2 votes
1 answer
548 views

I have a Future in a cross-platform JVM / JS application. The future is polled following way in JVM: val load = Future(loadSometing()) if (load.isCompleted) { val loaded = Await.result(load, ...
Suma's user avatar
  • 34.7k
0 votes
1 answer
62 views

I just upgraded Scala.rx version 0.3.2 to 0.4.0 and suddenly I get the following errors on my triggers: overloaded method value trigger with alternatives: [error] (f: Boolean => Unit)(implicit ...
Florian Baierl's user avatar
0 votes
2 answers
108 views

I have an user interface and provide a button to the user, which executes the function longComputation(x: A): A and updates then the user interface (particularly the model) with the new result. This ...
user1091344's user avatar
0 votes
0 answers
159 views

Is it possible to call a scala JS function directly from scala JVM with parameter passing ? I want to execute some javascript code in the browser, for example a plotting javascript library that ...
Nabih Nebbache's user avatar
1 vote
0 answers
53 views

I'm struggling with an error and I cannot think of good solution. I have class: @JSGlobal("THREE.Scene") class Scene extends js.Object { def add(obj: js.Object): Unit = ??? } and main: [...] ...
Filemon279's user avatar
1 vote
0 answers
455 views

I recently released my first Scala & Scala.js cross-building library to Sonatype. Now I want to use the Scala.js lib in one of my applications, however if I want to add a dependency to my lib ...
Florian Baierl's user avatar
2 votes
1 answer
152 views

I just successfully released my first Scala & Scala.js cross-building library to Sonatype and can now use the following two artifacts in my applicatons: https://search.maven.org/artifact/com....
Florian Baierl's user avatar
-1 votes
1 answer
141 views

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 ...
mcku's user avatar
  • 1,443
2 votes
1 answer
339 views

I have a small Scala library that I want to make use of in a Scala.js application: https://github.com/fbaierl/scala-tarjan For that reason, I have decided to create a cross-compiled library that ...
Florian Baierl's user avatar
1 vote
1 answer
686 views

I need a string interpolation like java.text.MessageFormat for scala.js. Specifically I need something that lets me chose the order in which my parameters are printed (like '{0}', '{1}') for our ...
Florian Baierl's user avatar
3 votes
2 answers
733 views

With javascript I can print styled logs on the console like e.g. this: console.log('%c Oh my heavens! ', 'background: #222; color: #bada55'); which will result in: Is there any way I can do the same ...
Florian Baierl's user avatar
0 votes
1 answer
80 views

I get a TypeError when extending a @js.native class in scala.js and running in node. object MainApp { def main(args: Array[String]): Unit = { println(new B()) } } class B extends A @js....
Upio's user avatar
  • 1,374
0 votes
1 answer
360 views

I want to get a very simple user authentification going in a web-app that is written in Scala.JS and whose backend is implemented in Play 2.6. Using the Scala.JS RosHTTP-library, my user-client ...
nondeterministic's user avatar
3 votes
1 answer
214 views

What is the standard/easiest way to make a normal scala library (sbt) available for scala.js (also sbt)? Do I just copy/fork the source files into a scala.js project and build that or is there any ...
Florian Baierl's user avatar
1 vote
1 answer
211 views

I wanted to use Simulacrum in Scalafiddle, like: import simulacrum._ @typeclass trait Ordering[T] { def compare(x: T, y: T): Int @op("<") def lt(x: T, y: T): Boolean = compare(x, y) < ...
pme's user avatar
  • 14.9k
0 votes
1 answer
134 views

It seems it is not possible to get the current value of a Binding like we can do for a Var(using method value). I looked at the source and this method is declared as being private for Binding class, ...
datalchemist's user avatar
1 vote
2 answers
727 views

I have very simple local module exporting a class. I would like to use this module locally, using ProvidedJS. No matter what I have tried, each time I do run or test in sbt, the compiler complains ...
Suma's user avatar
  • 34.7k
1 vote
0 answers
656 views

I'm using ScalaJs and ReactJs with React-Table. I've run into an odd issue where the Filter object in react-table is missing the filter value when I set a custom Filter component for a specific column....
Justin Fields's user avatar
2 votes
1 answer
125 views

Background: the real projects uses Three.js with a facade. Both Three.js and the facade define the equals method for many types, including Vector3. This is a small sample demonstrating the equals ...
Suma's user avatar
  • 34.7k
1 vote
1 answer
33 views

I have a project using Play Framework as a server and the client written in Scala.js and inserted into the page delivered via scalajs-scripts. There also is a shared sub-project used by both server ...
Oliver Ruebenacker's user avatar
1 vote
1 answer
1k views

I am using webpack 4.20.2 and scalajs ("0.6.24") , scalajs bundler(0.13.1) when i am building bundle file i am getting below webpack exceptions. I am attaching build.sbt which uses webpack.config....
donald's user avatar
  • 478
0 votes
2 answers
610 views

There are some objects in my Scala.js project I would like to access dynamically. I think I might be able to get this working using Dynamic, however currently the fastOptJS / fullOptJS step is ...
Suma's user avatar
  • 34.7k
0 votes
1 answer
661 views

My team works with Scala.js and I wanna use Material-UI. But those two's code types look very different. Most of the examples in Material-UI seem to be based on regular Javascript. I've tried to ...
Jay P.'s user avatar
  • 2,580
2 votes
1 answer
395 views

I'm trying to write an app that's part ScalaJS and part Play framework. I'm using the ScalaJS bundler. It's bundling my JavaScript fine and I can see the resulting files where they are supposed to go. ...
eje211's user avatar
  • 2,429
2 votes
2 answers
98 views

Does anyone now why IntelliJ is showing an error here even though sbt compiles and everything works correctly: *Edit: "stopEnabled" is a Boolean. As I understand, to not show an error here, I would ...
Florian Baierl's user avatar
0 votes
2 answers
479 views

In my scala-js application I want to use the bootstraptoggle library to create a nice looking switch button. So far I am creating the toggle button by a method looking somewhat like this: import ...
Florian Baierl's user avatar
0 votes
1 answer
305 views

Some JavaScript functions take an options parameter that can be created in Scala.js like this: js.Dynamic .literal( "onload" -> onloadHandler _, "filename" -> s"myFileName.txt" ) ....
Allan's user avatar
  • 121
1 vote
1 answer
527 views

Using scalatags, normally I create a table like this: table( thead( tr( th("A"), th("B") ) ), tbody( tr( td("HELLO"), td("WORLD") ), tr( td("FOO"), ...
Florian Baierl's user avatar
2 votes
1 answer
141 views

Try to get the cause for an Ajax.post failure (using Scala.Js) but get only the class name: Ajax.post( url = "...", data = "...", headers = Map("Content-Type"->"application/json; charset=utf-...
RobertJo's user avatar
  • 125
0 votes
1 answer
43 views

Say I want to produce the following javascript: var myObj = { x: 'a', y: 'b' } I can do this by callaing js.Dynamic.literal: val myObj = js.Dynamic.literal(x = "a", y = "b") But I can also represent ...
user79074's user avatar
  • 5,412
1 vote
0 answers
127 views

This question addresses the flip side of another question: Can JSweet viably port Java libraries for use in cross-built Scala.js projects? Imagine making a Scala.js facade for a JavaScript library, ...
Ben McKenneby's user avatar
2 votes
1 answer
236 views

Get an UndefinedBehaviorError when using a parameter of type case class in an scalajs method which I handover from a play framework Scala/Twirl template view/notify.scala.html: @(note: Notification, ....
RobertJo's user avatar
  • 125
1 vote
1 answer
400 views

I've defined function in Scala.js like this: val myFunction: js.Function1[js.Array[String], Boolean] = (data: js.Array[String]) => true And also defined Javascript function on the page: function ...
sergeda's user avatar
  • 2,231
4 votes
1 answer
390 views

The webjar ecosystem has recently been broken. See https://github.com/webjars/webjars/issues/1789 org.webjars.npm:react:16.2.0 depends on org.webjars.npm:loose-envify:[1.1.0,2) which now includes ...
Golly's user avatar
  • 1,330
1 vote
1 answer
78 views

Working with Scala.js, I have created some SVG elements like Text, Line, Rect, and now I am trying to set the style attribute with code like this, where element is of type svg.Stylable: element.style....
Oliver Ruebenacker's user avatar
0 votes
1 answer
268 views

I am trying to make some conditional routes. The condition resolves on the serverside. Route rule example: | (dynamicRouteCT("#user" / long.caseClass[User]) ~> dynRender((page: User) => <....
Oleg's user avatar
  • 941
-1 votes
1 answer
157 views

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 ...
Curious's user avatar
  • 921
1 vote
1 answer
247 views

The play framework documentation says (https://www.playframework.com/documentation/2.6.x/ScalaTemplates): You can then call this from any Scala code as you would normally call a method on a class: ...
RobertJo's user avatar
  • 125
2 votes
2 answers
400 views

In the search for ways to make Java libraries accessible to both the JavaScript and JVM sides of Scala.js cross-built projects, please consider the following experiment: Imagine that a Scala.js ...
Ben McKenneby's user avatar
2 votes
1 answer
404 views

I have a scala-js project, adding a particular library dependency, is affecting the way project test cases are running. Without the library dependency everything's fine, the moment I add them, tests ...
Vikas Sharma's user avatar
1 vote
0 answers
161 views

I'm extending XMLHttpRequest in Scala.js: class ReasonerHttpRequest(val reasonerId: String) extends XMLHttpRequest {} Then, I try to create: val http = new ReasonerHttpRequest(reasonerId) This ...
Oliver Ruebenacker's user avatar
4 votes
2 answers
574 views

There exist a few webpack bundle analysis scripts that show a list of included modules along with their sizes. However, Scala.js emits one big module for all the Scala code, so those tools can't look ...
Nikita's user avatar
  • 2,963
0 votes
1 answer
144 views

I am trying to perform some actions when my component did mount, but not immediately. My component looks like something this: object MyComponent { def apply = compopnent() class Backend($: ...
Oleg's user avatar
  • 941
7 votes
1 answer
2k views

After migrating to ScalaJS 0.6.23 from 0.6.21: (addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.23")) My sbt-build throws the following exception: ... [error] /Users/mpa/dev/Github/pme123/scala-...
pme's user avatar
  • 14.9k

1
3 4
5
6 7
18