From 8ac6c0fe4425753c64fa0ef0a129d33eef36cb5c Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 21 Jul 2012 13:55:35 -0400 Subject: --- lib/js/urweb.js | 6 ++++++ lib/ur/basis.urs | 3 +++ 2 files changed, 9 insertions(+) (limited to 'lib') diff --git a/lib/js/urweb.js b/lib/js/urweb.js index 35023924..87adc0a3 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -901,6 +901,12 @@ function setInnerHTML(node, html) { runScripts(node); } +function active(s) { + var span = document.createElement("span"); + addNode(span); + setInnerHTML(span, execF(s)); +} + function input(x, s, recreate, type, name) { if (name) x.name = name; if (type) x.type = type; diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs index 7f254a2f..8ac94668 100644 --- a/lib/ur/basis.urs +++ b/lib/ur/basis.urs @@ -767,6 +767,9 @@ val giveFocus : id -> transaction unit val dyn : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} -> [ctx ~ [Dyn]] => unit -> tag [Signal = signal (xml ([Dyn] ++ ctx) use bind)] ([Dyn] ++ ctx) [] use bind +val active : unit + -> tag [Code = transaction xbody] body [] [] [] + val head : unit -> tag [] html head [] [] val title : unit -> tag [] head [] [] [] val link : unit -> tag [Id = id, Rel = string, Typ = string, Href = url, Media = string] head [] [] [] -- cgit v1.2.3