From fabrice.leal.ch at gmail.com Wed Jul 4 16:10:57 2018 From: fabrice.leal.ch at gmail.com (Fabrice Leal) Date: Wed, 4 Jul 2018 21:10:57 +0100 Subject: [Ur] calling javascript code in Message-ID: is it possible to trigger javascript code when calling 'set s ...' ? as i understand the main usage seems to be regenerating html node trees; i think i could get away with generating some dummy html node with the javascript call in onload event, but I'm asking just to make sure I'm not missing anything. my goal is, for instance, to update some state on the client side and trigger a canvas redraw, since i seem to be unable to call '... <- signal s;' inside a 'transaction page' --- Fabrice Leal -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamc at csail.mit.edu Wed Jul 4 16:17:28 2018 From: adamc at csail.mit.edu (Adam Chlipala) Date: Wed, 4 Jul 2018 16:17:28 -0400 Subject: [Ur] calling javascript code in In-Reply-To: References: Message-ID: Let me try to disentangle the potential parts of your question. I hope you are not asking about literally writing code in JavaScript.  I will proceed as though you are actually asking about /client-side code/, but let me know if I misunderstood.  (It is a rather nice feature of Ur/Web that writing Ur/Web programs need not involve JavaScript at all, anymore than we talk about "transistors" when reading JavaScript code!) So, then, I conclude that your question is how to add a listener on a [source], to run arbitrary client-side code whenever the source changes.  You seem to be on a good track there, with the mention of a dummy node.  I would create a node that generates only a