Skip to content

Commit c48e2af

Browse files
committed
Stop using namespaced top-level exports in the examples.
Namespaced top-level exports were deprecated in Scala.js 0.6.26.
1 parent ef1f303 commit c48e2af

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

example/src/main/scala/example/Example.scala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import scala.scalajs.js.annotation._
55
import org.scalajs.dom
66
import dom.html
77

8-
@JSExportTopLevel("example.Alert")
8+
@JSExportTopLevel("ExampleAlert")
99
object Alert {
1010
@JSExport
1111
def main() = {
@@ -14,7 +14,7 @@ object Alert {
1414
}
1515
}
1616

17-
@JSExportTopLevel("example.NodeAppendChild")
17+
@JSExportTopLevel("ExampleNodeAppendChild")
1818
object NodeAppendChild {
1919
@JSExport
2020
def main(div: html.Div) = {
@@ -28,7 +28,7 @@ object NodeAppendChild {
2828
}
2929
}
3030

31-
@JSExportTopLevel("example.ElementStyle")
31+
@JSExportTopLevel("ExampleElementStyle")
3232
object ElementStyle {
3333
@JSExport
3434
def main(div: html.Div) = {
@@ -43,7 +43,7 @@ object ElementStyle {
4343
}
4444
}
4545

46-
@JSExportTopLevel("example.LocalStorage")
46+
@JSExportTopLevel("ExampleLocalStorage")
4747
object LocalStorage {
4848
@JSExport
4949
def main(in: html.Input, box: html.Div) = {
@@ -62,7 +62,7 @@ object LocalStorage {
6262
}
6363
}
6464

65-
@JSExportTopLevel("example.Canvas")
65+
@JSExportTopLevel("ExampleCanvas")
6666
object Canvas {
6767
@JSExport
6868
def main(c: html.Canvas) = {
@@ -88,7 +88,7 @@ object Canvas {
8888
}
8989
}
9090

91-
@JSExportTopLevel("example.Base64")
91+
@JSExportTopLevel("ExampleBase64")
9292
object Base64 {
9393
@JSExport
9494
def main(in: html.Input,
@@ -100,7 +100,7 @@ object Base64 {
100100
}
101101
}
102102

103-
@JSExportTopLevel("example.EventHandler")
103+
@JSExportTopLevel("ExampleEventHandler")
104104
object EventHandler{
105105
@JSExport
106106
def main(pre: html.Pre) = {
@@ -118,7 +118,7 @@ object EventHandler{
118118
}
119119
}
120120

121-
@JSExportTopLevel("example.XMLHttpRequest")
121+
@JSExportTopLevel("ExampleXMLHttpRequest")
122122
object XMLHttpRequest{
123123
@JSExport
124124
def main(pre: html.Pre) = {
@@ -137,7 +137,7 @@ object XMLHttpRequest{
137137
}
138138
}
139139

140-
@JSExportTopLevel("example.Websocket")
140+
@JSExportTopLevel("ExampleWebsocket")
141141
object Websocket {
142142
@JSExport
143143
def main(in: html.Input,
@@ -157,7 +157,7 @@ object Websocket {
157157
}
158158
}
159159

160-
@JSExportTopLevel("example.AjaxExtension")
160+
@JSExportTopLevel("ExampleAjaxExtension")
161161
object AjaxExtension {
162162
@JSExport
163163
def main(pre: html.Pre) = {

readme/Index.scalatex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
),
2424
div(width:="50%", float.left, padding:="8px", boxSizing.`border-box`)(
2525
if (!autorun)
26-
a(cls:="pure-button", onclick:=s"example.$example.main($queries)", "Run"),
26+
a(cls:="pure-button", onclick:=s"Example$example.main($queries)", "Run"),
2727
div(
2828
frags.zip(ids).map{case (f, i) => f(id:=i, backgroundColor:="#fafafa")}
2929
),
3030
if (autorun)
31-
script(s"example.$example.main($queries)")
31+
script(s"Example$example.main($queries)")
3232
),
3333
div(clear.both)
3434
)

0 commit comments

Comments
 (0)