fix init.ml
This commit is contained in:
@ -35,6 +35,9 @@ let headers_of_string_list (sl : string list) : Httpaf.Headers.t =
|
|||||||
(String.index_opt s ':'))
|
(String.index_opt s ':'))
|
||||||
sl)
|
sl)
|
||||||
|
|
||||||
|
let appendchild ~container html =
|
||||||
|
Dom.appendChild container (Tyxml_js.To_dom.of_a html)
|
||||||
|
|
||||||
let setup_workspace ~container cstore : unit Lwt.t =
|
let setup_workspace ~container cstore : unit Lwt.t =
|
||||||
let render ~container cstore : unit Lwt.t =
|
let render ~container cstore : unit Lwt.t =
|
||||||
let module Headers = Httpaf.Headers in
|
let module Headers = Httpaf.Headers in
|
||||||
@ -55,23 +58,21 @@ let setup_workspace ~container cstore : unit Lwt.t =
|
|||||||
~some:(fun s -> s)
|
~some:(fun s -> s)
|
||||||
(Headers.get headers "path"))
|
(Headers.get headers "path"))
|
||||||
in
|
in
|
||||||
Dom.appendChild container
|
appendchild ~container
|
||||||
(Tyxml_js.To_dom.of_a
|
Tyxml_js.Html.(
|
||||||
Tyxml_js.Html.(
|
a
|
||||||
a
|
~a:[ a_class [ "window" ] ]
|
||||||
~a:[ a_class [ "window" ] ]
|
[
|
||||||
[
|
div
|
||||||
div
|
~a:[ a_class [ "status" ] ]
|
||||||
~a:[ a_class [ "status" ] ]
|
[
|
||||||
[
|
txt
|
||||||
txt
|
(F.str "Name: %s; Path: %a" step Uri.pp_hum uri);
|
||||||
(F.str "Name: %s; Path: %a" step Uri.pp_hum
|
];
|
||||||
uri);
|
div
|
||||||
];
|
~a:[ a_class [ "output" ] ]
|
||||||
div
|
[ txt (F.str "%s" contents) ];
|
||||||
~a:[ a_class [ "output" ] ]
|
]);
|
||||||
[ txt (F.str "%s" contents) ];
|
|
||||||
]));
|
|
||||||
Lwt.return_unit)
|
Lwt.return_unit)
|
||||||
csl
|
csl
|
||||||
in
|
in
|
||||||
|
|||||||
Reference in New Issue
Block a user