blob: 3d58c5ae0e0db2e159e7dbb4effb69f788c2f294 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package mavigator
package util
import org.scalajs.dom.html
/** Represents an application's environment */
trait Environment {
/** The application's root element. */
def root: html.Element
/** Retrieve an asset's URL based on its file location. */
def asset(file: String): String
}
class StaticEnvironment(
override val root: html.Element,
assetsBase: String
) extends Environment {
override def asset(file: String): String = assetsBase + "/" + file
}
|