Now I tried the recent release 9.3.22 of SWI-Prolog which claims:
But somehow “HTML Writer” is missing. What Tau-Prolog
called internally Streamable DOM. This here works:
setup :-
body(Body),
create('div', Elem),
set_attr(Elem, #id, #writeme),
append_child(Body, Elem).
Unfortunately this here doesn’t work, the example given by José
Antonio Riaza Valverde in this GitHub issue discussion:
output :-
get_by_id(writeme, WriteMe),
open(WriteMe, write, Stream),
write(Stream, hello),
write(Stream, world).
I get this error in SWI-Tinker:
open/[3,4]
doesn’t recognize the js_HTMLDivElement
, and does
not provide a raw write stream on it.