scala-js / scala-js-env-jsdom-nodejs Edit

Node.js with jsdom environment for Scala.js

Version Matrix


scalajs-env-jsdom-nodejs is a JavaScript environment for Scala.js (a JSEnv) running Node.js with jsdom.

This repository contains scalajs-env-jsdom-nodejs for Scala.js 1.x. In Scala.js 0.6.x, the Node.js with jsdom environment is part of the core distribution.


Add the following line to project/plugins.sbt:

libraryDependencies += "org.scala-js" %% "scalajs-env-jsdom-nodejs" % "1.1.0"

and the following line to build.sbt (possibly in the settings/jsSettings of Scala.js projects):

jsEnv := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv()

Finally, make sure that jsdom 10.0.0 or later is avilable in your project. You can install it with

$ npm install jsdom

See the Scaladoc for other configuration options.