Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion lib/js_of_ocaml/xmlHttpRequest.ml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class type xmlHttpRequest =

method response : File.file_any readonly_prop

method responseText : js_string t readonly_prop
method responseText : js_string t opt readonly_prop

method responseXML : Dom.element Dom.document t opt readonly_prop

Expand Down
2 changes: 1 addition & 1 deletion lib/js_of_ocaml/xmlHttpRequest.mli
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class type xmlHttpRequest =

method response : File.file_any readonly_prop

method responseText : js_string t readonly_prop
method responseText : js_string t opt readonly_prop

method responseXML : Dom.element Dom.document t opt readonly_prop

Expand Down
4 changes: 2 additions & 2 deletions lib/lwt/lwt_xmlHttpRequest.ml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ exception Wrong_headers of (int * (string -> string option))
let default_response url code headers req =
{ url
; code
; content = Js.to_string req##.responseText
; content = Js.Opt.case req##.responseText (fun () -> "") (fun x -> Js.to_string x)
; content_xml =
(fun () ->
match Js.Opt.to_option req##.responseXML with
Expand All @@ -59,7 +59,7 @@ let default_response url code headers req =
let text_response url code headers req =
{ url
; code
; content = req##.responseText
; content = Js.Opt.case req##.responseText (fun () -> Js.string "") (fun x -> x)
; content_xml = (fun () -> assert false)
; headers }

Expand Down