Skip to content

Commit ef6b16c

Browse files
committed
Clarify why the AJAX helpers are deprecated
1 parent 056cb0d commit ef6b16c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ 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("scalajs-dom no longer includes custom utilities, only facades. Try using dom.fetch API which doesn't require additional utilities.", "2.0.0")
1414
object Ajax {
1515

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

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ 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("scalajs-dom no longer includes custom utilities, only facades. Try using dom.fetch API which doesn't require additional utilities.", "2.0.0")
99
case class AjaxException(xhr: dom.XMLHttpRequest) extends Exception {
1010
def isTimeout: Boolean = xhr.status == 0 && xhr.readyState == 4
1111
}
1212

1313
// 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")
14+
@deprecated("scalajs-dom no longer includes custom utilities, only facades. Try using dom.fetch API which doesn't require additional utilities.", "2.0.0")
1515
object AjaxException extends (dom.XMLHttpRequest => AjaxException)

0 commit comments

Comments
 (0)