Skip to content

Commit a1aeaa3

Browse files
authored
Merge pull request #607 from scala-js/topic/ajax
Deprecate AJAX more quietly
2 parents 056cb0d + 9636689 commit a1aeaa3

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/main/scala/org/scalajs/dom/ext/Ajax.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ import scala.scalajs.js.typedarray.ArrayBufferView
1010
import scala.scalajs.js.typedarray.TypedArrayBufferOps._
1111

1212
/** Wraps an XMLHttpRequest to provide an easy one-line way of making an Ajax call, returning a Future. */
13-
@deprecated("use the dom.fetch API instead", "2.0.0")
13+
@deprecated(
14+
"scalajs-dom no longer includes custom utilities, only facades. Try using dom.fetch API which doesn't require additional utilities.",
15+
"2.0.0")
1416
object Ajax {
1517

1618
/** Supported data formats for Ajax are implicitly converted to InputData */

src/main/scala/org/scalajs/dom/ext/AjaxException.scala

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ import org.scalajs.dom
55
/** Thrown when `Ajax.get` or `Ajax.post` receives a non-20X response code. Contains the XMLHttpRequest that resulted in
66
* that response
77
*/
8-
@deprecated("use the dom.fetch API instead", "2.0.0")
8+
@deprecated(
9+
"scalajs-dom no longer includes custom utilities, only facades. Try using dom.fetch API which doesn't require additional utilities.",
10+
"2.0.0")
911
case class AjaxException(xhr: dom.XMLHttpRequest) extends Exception {
1012
def isTimeout: Boolean = xhr.status == 0 && xhr.readyState == 4
1113
}
1214

1315
// This is just there to work around some weird warnings in Scala 3.x
14-
@deprecated("use the dom.fetch API instead", "2.0.0")
16+
@deprecated(
17+
"scalajs-dom no longer includes custom utilities, only facades. Try using dom.fetch API which doesn't require additional utilities.",
18+
"2.0.0")
1519
object AjaxException extends (dom.XMLHttpRequest => AjaxException)

0 commit comments

Comments
 (0)