These changes are all about enabling it to be used in a context where the script may be supplied not just once when the page is loaded, but multiple times in response to events (such as a button click). I need this for the new "try it!" page (https://github.com/JoeStrout/miniscript-tryit).
It also includes an attempt to fix the print function so that it works with values other than strings. But this resulted in only partial success, as you can see in the attachment.
We really need some way to invoke whatever str does, from basicIO.ts.
But perhaps you can merge this PR, then fix that bug (if it's easy for you) and I'll pull your changes back down to my fork?
These changes are all about enabling it to be used in a context where the script may be supplied not just once when the page is loaded, but multiple times in response to events (such as a button click). I need this for the new "try it!" page (https://github.com/JoeStrout/miniscript-tryit).
It also includes an attempt to fix the
print
function so that it works with values other than strings. But this resulted in only partial success, as you can see in the attachment.We really need some way to invoke whatever
str
does, from basicIO.ts.But perhaps you can merge this PR, then fix that bug (if it's easy for you) and I'll pull your changes back down to my fork?