Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move duplex over to RequestInit as a var
  • Loading branch information
zetashift committed Aug 20, 2022
commit d68117b978f9dd86363c179f57d5a45c756fafd0
5 changes: 0 additions & 5 deletions dom/src/main/scala/org/scalajs/dom/Request.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,4 @@ class Request(input: RequestInfo, init: RequestInit = null) extends Body {
def keepalive: Boolean = js.native

def signal: AbortSignal = js.native

/** "half" is the only valid value and it is for initiating a half-duplex fetch (i.e., the user agent sends the entire
* request before processing the response).
*/
def duplex: RequestDuplex = js.native
}
5 changes: 5 additions & 0 deletions dom/src/main/scala/org/scalajs/dom/RequestInit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ trait RequestInit extends js.Object {

var signal: js.UndefOr[AbortSignal] = js.undefined

/** "half" is the only valid value and it is for initiating a half-duplex fetch (i.e., the user agent sends the entire
* request before processing the response).
*/
var duplex: js.UndefOr[RequestDuplex] = js.undefined

/** The whatwg spec section on [[https://fetch.spec.whatwg.org/#requestinit RequestInit dictionary]] has a comment
* that states that this value "can only be set to null". In the detailed steps section for
* [[https://fetch.spec.whatwg.org/#dom-request the Request(input,init) constructor]] it says even more clearly: "If
Expand Down