# HG changeset patch # User Adam Chlipala # Date 1229878860 18000 # Node ID 86d324061ddc3f9ffbc5bc917cadb4fcd265a915 # Parent af0df56ecc2cc8ab84804981b8c58f933abae9c5 Switch to using dyn() function in JavaScript diff -r af0df56ecc2c -r 86d324061ddc jslib/urweb.js --- a/jslib/urweb.js Sat Dec 20 18:24:12 2008 -0500 +++ b/jslib/urweb.js Sun Dec 21 12:01:00 2008 -0500 @@ -1,1 +1,7 @@ function sreturn(v) { return {v : v} } + +function dyn(s) { + var x = document.createElement("span"); + x.innerHTML = s.v; + document.body.appendChild(x); +} diff -r af0df56ecc2c -r 86d324061ddc src/monoize.sml --- a/src/monoize.sml Sat Dec 20 18:24:12 2008 -0500 +++ b/src/monoize.sml Sun Dec 21 12:01:00 2008 -0500 @@ -1850,20 +1850,14 @@ | "dyn" => (case #1 attrs of - (*L'.ERecord [("Signal", (L'.ESignalReturn e, _), _)] => (e, fm) - | L'.ERecord [("Signal", (L'.EApp ((L'.EAbs (_, _, _, (L'.ESignalReturn (L'.ERel 0, _), _)), _), + (*L'.ERecord [("Signal", (L'.EApp ((L'.EAbs (_, _, _, (L'.ESignalReturn (L'.ERel 0, _), _)), _), e), _), _)] => (e, fm) *) L'.ERecord [("Signal", e, _)] => ((L'.EStrcat - ((L'.EPrim (Prim.String ""), loc)), loc)), loc), + ((L'.EPrim (Prim.String ""), loc)), loc)), loc), fm) | _ => raise Fail "Monoize: Bad dyn attributes")