File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
example/src/main/scala/example Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -123,10 +123,13 @@ object XMLHttpRequest{
123123 @ JSExport
124124 def main (pre : html.Pre ) = {
125125 val xhr = new dom.XMLHttpRequest ()
126- xhr.open(" GET" , " https://www.boredapi.com/api/activity" )
126+ xhr.open(" GET" ,
127+ " https://www.boredapi.com/api/activity"
128+ )
127129 xhr.onload = { (e : dom.Event ) =>
128130 if (xhr.status == 200 ) {
129- pre.textContent = xhr.responseText
131+ pre.textContent =
132+ xhr.responseText
130133 }
131134 }
132135 xhr.send()
@@ -162,7 +165,8 @@ object AjaxExtension {
162165 .ExecutionContext
163166 .Implicits
164167 .global
165- val url = " https://www.boredapi.com/api/activity"
168+ val url =
169+ " https://www.boredapi.com/api/activity"
166170 Ajax .get(url).foreach { case xhr =>
167171 pre.textContent = xhr.responseText
168172 }
You can’t perform that action at this time.
0 commit comments