GitHub - NickCellino/clj-browser-eval: turn any HTML input field into a Clojure interpreter (original) (raw)
clj-browser-eval
This is a thing that lets you turn any HTML input field into a Clojure interpreter.
CodePen: https://codepen.io/nichelodean/pen/zYWEgeW
quick start
In your html:
Evaluate
clj-interpreter
marks the container div for an interpreter
clj-code
marks the text input that you want to use as the input for the interpreter
clj-eval
designates the button (or any clickable thing) that you want to use to trigger evaluation
clj-result
(optional - results will be window.alert'ed if this is not provided) designates where the result should go
multiple interpreters on one page
You can do as many of these on a page as you like!
Evaluate
Evaluate
Evaluate
installing with npm
npm install clj-browser-eval
some considerations
I have no idea what I'm doing and you should not use this for anything real.
credits
Made possible by scittle!