Skip to content

Commit cb52454

Browse files
committed
Mark AJAX as deprecated in scaladocs only
1 parent ae272c5 commit cb52454

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

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

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

12-
/** Wraps an XMLHttpRequest to provide an easy one-line way of making an Ajax call, returning a Future. */
12+
/** Wraps an XMLHttpRequest to provide an easy one-line way of making an Ajax call, returning a Future.
13+
* @deprecated
14+
* use the `dom.fetch` API instead
15+
*/
1316
object Ajax {
1417

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

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ package org.scalajs.dom.ext
33
import org.scalajs.dom
44

55
/** Thrown when `Ajax.get` or `Ajax.post` receives a non-20X response code. Contains the XMLHttpRequest that resulted in
6-
* that response
6+
* @deprecated
7+
* use the `dom.fetch` API instead
78
*/
89
case class AjaxException(xhr: dom.XMLHttpRequest) extends Exception {
910
def isTimeout: Boolean = xhr.status == 0 && xhr.readyState == 4
1011
}
1112

13+
/** @deprecated use the `dom.fetch` API instead */
1214
// This is just there to work around some weird warnings in Scala 3.x
1315
object AjaxException extends (dom.XMLHttpRequest => AjaxException)

0 commit comments

Comments
 (0)