Skip to content

Commit ae272c5

Browse files
committed
Un-deprecate AJAX
Closes #606
1 parent 8bc441a commit ae272c5

File tree

4 files changed

+26
-29
lines changed

4 files changed

+26
-29
lines changed

api-reports/2_12.txt

+13-13
Original file line numberDiff line numberDiff line change
@@ -25798,25 +25798,25 @@ experimental/webrtc/package[SO] @deprecated("use dom.RTCSessionDescriptionInit i
2579825798
experimental/webrtc/package[SO] @deprecated("use dom.RTCSignalingState instead", "2.0.0") val RTCSignalingState = dom.RTCSignalingState
2579925799
experimental/webrtc/package[SO] @deprecated("use dom.RTCStatsType instead", "2.0.0") val RTCStatsType = dom.RTCStatsType
2580025800
experimental/webrtc/package[SO] def toWebRTC(n: dom.Navigator): NavigatorMediaStream (@deprecated in 2.0.0)
25801-
ext/Ajax[SO] def apply(method: String, url: String, data: InputData, timeout: Int, headers: Map[String, String], withCredentials: Boolean, responseType: String): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0)
25802-
ext/Ajax[SO] implicit def arrayBufferView2ajax(b: ArrayBufferView): InputData (@deprecated in 2.0.0)
25803-
ext/Ajax[SO] implicit def blob2ajax(b: Blob): InputData (@deprecated in 2.0.0)
25804-
ext/Ajax[SO] implicit def byteBuffer2ajax(data: ByteBuffer): InputData (@deprecated in 2.0.0)
25805-
ext/Ajax[SO] def delete(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0)
25806-
ext/Ajax[SO] implicit def formdata2ajax(b: FormData): InputData (@deprecated in 2.0.0)
25807-
ext/Ajax[SO] def get(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0)
25808-
ext/Ajax[SO] def patch(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0)
25809-
ext/Ajax[SO] def post(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0)
25810-
ext/Ajax[SO] def put(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0)
25811-
ext/Ajax[SO] implicit def str2ajax(s: String): InputData (@deprecated in 2.0.0)
25801+
ext/Ajax[SO] def apply(method: String, url: String, data: InputData, timeout: Int, headers: Map[String, String], withCredentials: Boolean, responseType: String): Future[dom.XMLHttpRequest]
25802+
ext/Ajax[SO] implicit def arrayBufferView2ajax(b: ArrayBufferView): InputData
25803+
ext/Ajax[SO] implicit def blob2ajax(b: Blob): InputData
25804+
ext/Ajax[SO] implicit def byteBuffer2ajax(data: ByteBuffer): InputData
25805+
ext/Ajax[SO] def delete(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest]
25806+
ext/Ajax[SO] implicit def formdata2ajax(b: FormData): InputData
25807+
ext/Ajax[SO] def get(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest]
25808+
ext/Ajax[SO] def patch(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest]
25809+
ext/Ajax[SO] def post(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest]
25810+
ext/Ajax[SO] def put(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest]
25811+
ext/Ajax[SO] implicit def str2ajax(s: String): InputData
2581225812
ext/Ajax.InputData[JT]
2581325813
ext/Ajax.InputData[SO] implicit def arrayBufferView2ajax(b: ArrayBufferView): InputData
2581425814
ext/Ajax.InputData[SO] implicit def blob2ajax(b: Blob): InputData
2581525815
ext/Ajax.InputData[SO] implicit def byteBuffer2ajax(data: ByteBuffer): InputData
2581625816
ext/Ajax.InputData[SO] implicit def formdata2ajax(b: FormData): InputData
2581725817
ext/Ajax.InputData[SO] implicit def str2ajax(s: String): InputData
25818-
ext/AjaxException[SC] def isTimeout: Boolean (@deprecated in 2.0.0)
25819-
ext/AjaxException[SO] (@deprecated in 2.0.0)
25818+
ext/AjaxException[SC] def isTimeout: Boolean
25819+
ext/AjaxException[SO]
2582025820
ext/package[SO] val KeyCode: dom.KeyCode.type (@deprecated in 2.0.0)
2582125821
ext/package[SO] val KeyLocation: dom.KeyLocation.type (@deprecated in 2.0.0)
2582225822
ext/package[SO] val KeyValue: dom.KeyValue.type (@deprecated in 2.0.0)

api-reports/2_13.txt

+13-13
Original file line numberDiff line numberDiff line change
@@ -25798,25 +25798,25 @@ experimental/webrtc/package[SO] @deprecated("use dom.RTCSessionDescriptionInit i
2579825798
experimental/webrtc/package[SO] @deprecated("use dom.RTCSignalingState instead", "2.0.0") val RTCSignalingState = dom.RTCSignalingState
2579925799
experimental/webrtc/package[SO] @deprecated("use dom.RTCStatsType instead", "2.0.0") val RTCStatsType = dom.RTCStatsType
2580025800
experimental/webrtc/package[SO] def toWebRTC(n: dom.Navigator): NavigatorMediaStream (@deprecated in 2.0.0)
25801-
ext/Ajax[SO] def apply(method: String, url: String, data: InputData, timeout: Int, headers: Map[String, String], withCredentials: Boolean, responseType: String): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0)
25802-
ext/Ajax[SO] implicit def arrayBufferView2ajax(b: ArrayBufferView): InputData (@deprecated in 2.0.0)
25803-
ext/Ajax[SO] implicit def blob2ajax(b: Blob): InputData (@deprecated in 2.0.0)
25804-
ext/Ajax[SO] implicit def byteBuffer2ajax(data: ByteBuffer): InputData (@deprecated in 2.0.0)
25805-
ext/Ajax[SO] def delete(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0)
25806-
ext/Ajax[SO] implicit def formdata2ajax(b: FormData): InputData (@deprecated in 2.0.0)
25807-
ext/Ajax[SO] def get(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0)
25808-
ext/Ajax[SO] def patch(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0)
25809-
ext/Ajax[SO] def post(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0)
25810-
ext/Ajax[SO] def put(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest] (@deprecated in 2.0.0)
25811-
ext/Ajax[SO] implicit def str2ajax(s: String): InputData (@deprecated in 2.0.0)
25801+
ext/Ajax[SO] def apply(method: String, url: String, data: InputData, timeout: Int, headers: Map[String, String], withCredentials: Boolean, responseType: String): Future[dom.XMLHttpRequest]
25802+
ext/Ajax[SO] implicit def arrayBufferView2ajax(b: ArrayBufferView): InputData
25803+
ext/Ajax[SO] implicit def blob2ajax(b: Blob): InputData
25804+
ext/Ajax[SO] implicit def byteBuffer2ajax(data: ByteBuffer): InputData
25805+
ext/Ajax[SO] def delete(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest]
25806+
ext/Ajax[SO] implicit def formdata2ajax(b: FormData): InputData
25807+
ext/Ajax[SO] def get(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest]
25808+
ext/Ajax[SO] def patch(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest]
25809+
ext/Ajax[SO] def post(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest]
25810+
ext/Ajax[SO] def put(url: String, data: InputData = null, timeout: Int = 0, headers: Map[String, String] = Map.empty, withCredentials: Boolean = false, responseType: String = ""): Future[dom.XMLHttpRequest]
25811+
ext/Ajax[SO] implicit def str2ajax(s: String): InputData
2581225812
ext/Ajax.InputData[JT]
2581325813
ext/Ajax.InputData[SO] implicit def arrayBufferView2ajax(b: ArrayBufferView): InputData
2581425814
ext/Ajax.InputData[SO] implicit def blob2ajax(b: Blob): InputData
2581525815
ext/Ajax.InputData[SO] implicit def byteBuffer2ajax(data: ByteBuffer): InputData
2581625816
ext/Ajax.InputData[SO] implicit def formdata2ajax(b: FormData): InputData
2581725817
ext/Ajax.InputData[SO] implicit def str2ajax(s: String): InputData
25818-
ext/AjaxException[SC] def isTimeout: Boolean (@deprecated in 2.0.0)
25819-
ext/AjaxException[SO] (@deprecated in 2.0.0)
25818+
ext/AjaxException[SC] def isTimeout: Boolean
25819+
ext/AjaxException[SO]
2582025820
ext/package[SO] val KeyCode: dom.KeyCode.type (@deprecated in 2.0.0)
2582125821
ext/package[SO] val KeyLocation: dom.KeyLocation.type (@deprecated in 2.0.0)
2582225822
ext/package[SO] val KeyValue: dom.KeyValue.type (@deprecated in 2.0.0)

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

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ 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")
1413
object Ajax {
1514

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

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

-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ 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")
98
case class AjaxException(xhr: dom.XMLHttpRequest) extends Exception {
109
def isTimeout: Boolean = xhr.status == 0 && xhr.readyState == 4
1110
}
1211

1312
// 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")
1513
object AjaxException extends (dom.XMLHttpRequest => AjaxException)

0 commit comments

Comments
 (0)