diff --git a/example/src/main/scala/example/Example.scala b/example/src/main/scala/example/Example.scala index 16a751fdb..4e3d76300 100644 --- a/example/src/main/scala/example/Example.scala +++ b/example/src/main/scala/example/Example.scala @@ -123,9 +123,8 @@ object XMLHttpRequest{ @JSExport def main(pre: html.Pre) = { val xhr = new dom.XMLHttpRequest() - xhr.open("GET", - "http://api.openweathermap.org/" + - "data/2.5/weather?q=Singapore" + xhr.open("GET", + "https://www.boredapi.com/api/activity" ) xhr.onload = { (e: dom.Event) => if (xhr.status == 200) { @@ -142,7 +141,7 @@ object Websocket { @JSExport def main(in: html.Input, pre: html.Pre) = { - val echo = "ws://echo.websocket.org" + val echo = "wss://echo.websocket.org" val socket = new dom.WebSocket(echo) socket.onmessage = { (e: dom.MessageEvent) => @@ -167,8 +166,7 @@ object AjaxExtension { .Implicits .global val url = - "http://api.openweathermap.org/" + - "data/2.5/weather?q=Singapore" + "https://www.boredapi.com/api/activity" Ajax.get(url).foreach { case xhr => pre.textContent = xhr.responseText } diff --git a/readme/Index.scalatex b/readme/Index.scalatex index 3649d861e..14d5b9246 100644 --- a/readme/Index.scalatex +++ b/readme/Index.scalatex @@ -48,7 +48,7 @@ @pair("Alert", Nil) @p - Will cause a javascript alert box saying `HAI` to appear. Other javascript classes and objects can be similarly accessed e.g. @hl.scala{new dom.XMLHttpRequest()} to perform a new Ajax request, @hl.scala{dom.document} to access the global @hl.scala{document} object, or @hl.scala{html.Div} to to refer to the type of a @hl.scala{
} element. + Will cause a javascript alert box saying `Hi from Scala-js-dom` to appear. Other javascript classes and objects can be similarly accessed e.g. @hl.scala{new dom.XMLHttpRequest()} to perform a new Ajax request, @hl.scala{dom.document} to access the global @hl.scala{document} object, or @hl.scala{html.Div} to to refer to the type of a @hl.scala{
} element. @sect{Usage} @p @@ -90,7 +90,7 @@ @sect{Node.onmousemove} @pair( "EventHandler", - Seq(pre("pre")), + Seq(pre("Hover this box!")), autorun=true )