From e16efaf6603c4da33b74b499e0e1214c46ddf72d Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Wed, 17 Jul 2019 14:28:46 -0400 Subject: New JavaScript FFI function 'listen' --- doc/manual.tex | 1 + lib/js/urweb.js | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/doc/manual.tex b/doc/manual.tex index ba53f5d8..62b322ae 100644 --- a/doc/manual.tex +++ b/doc/manual.tex @@ -2573,6 +2573,7 @@ It is possible to write JavaScript FFI code that interacts with the functional-r \item \cd{sr(v)} and \cd{sb(s, f)}, the ``return'' and ``bind'' monad operators, respectively \item \cd{ss(s)}, to produce the signal corresponding to source \cd{s} \item \cd{scur(s)}, to get the current value of signal \cd{s} + \item \cd{listen(s, f)}, to ask that function \cd{f} be called with the current value of \cd{s}, every time it changes, including immediately upon establishing this listener \end{itemize} \item The behavior of the \cd{} pseudo-tag may be mimicked by following the right convention in a piece of HTML source code with a type like $\mt{xbody}$. Such a piece of source code may be encoded with a JavaScript string. To insert a dynamic section, include a \cd{