> > I tried to investigate how you embed the REPL but no luck.
> > Could you explain please? Are the exprs executed on the server?!?
>
> It is the function 'try-it-repl', which is a modification of the 'repl'
> function in "@lib/form.l".
>
> So, yes, it is executed on the server. This feature opens up the server
> completely, so it is better not enabled on a publicly accessible system.
>

Exactly. Honestly, this section is just one hack piled on top of another.
I started with the 'repl' function and noticed that I could hit enter
instead of clicking the 'eval' button. So I just hid the buttons with CSS
to give it a cleaner look. You can easily break it by typing in your
expression and then clicking outside of the input box; enter will then
do nothing. Furthermore, the space where the results show up is
actually a textarea, as in the original 'repl'. I wanted just the input bar,
so again I used CSS to make the textarea the same color as the
background. Hah!

I'm in total agreement with Alex, let's not include this on the version
that eventually goes public. It's dangerous, and would be a lot of effort
to make it not so, all for something that's mostly a novelty. And as Vid
mentioned below, it takes up a ton of valuable real estate at the top.

It was fun to build and I learned more about CSS in doing it. Good
enough for me :)

Reply via email to