[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GuileScript 0.0.0 released
From: |
Aleix Conchillo Flaqué |
Subject: |
Re: GuileScript 0.0.0 released |
Date: |
Tue, 18 Jan 2022 00:12:50 -0800 |
Hi Daniel,
Yes, I was thinking adding support for interacting with the DOM at
some point.
Many cool things can be done. Thanks for the interest!
Aleix
On Tue, Jan 18, 2022, 12:07 AM Daniel Meißner <
daniel.meissner-i4k@ruhr-uni-bochum.de> wrote:
> Hi Aleix,
>
> this is so cool, thanks for sharing! Do you have any plans on adding
> some simple WebAPI support? I mean something along the following would
> be very cool:
>
> (render (document:query-selector ".app")
> `(form (h1 ,title)
> (input (@ (type "text")))
> (input (@ (type "submit")))))
>
> compiles to:
>
> const target = document.querySelector(".app");
> const el1 = document.createElement("form");
> const el2 = document.createElement("h1");
> el2.innerText = title;
> const el3 = document.createElement("input");
> el3.setAttribute("type", "text");
> const el4 = document.createElement("input");
> el4.setAttribute("type", "submit");
> el1.append(el2, el3, el4);
>
> I imagine having a lot of fun writing a Browser web app in Guile :-)
>
> Best
> Daniel
>