diff options
author | 2011-12-20 21:06:25 -0500 | |
---|---|---|
committer | 2011-12-20 21:06:25 -0500 | |
commit | 0bd86cec8a712d19d4378d84584c7d0ba4e5a7af (patch) | |
tree | d9e53978a43e192feafccbc2c2cf18a227db4db6 /lib/ur/basis.urs | |
parent | 68494954ab57a448c90b612e047b6785db133522 (diff) |
Refactor HTML contexts to prevent some illegal nestings (that can crash the JavaScript runtime system)
Diffstat (limited to 'lib/ur/basis.urs')
-rw-r--r-- | lib/ur/basis.urs | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs index a2209150..17e969ef 100644 --- a/lib/ur/basis.urs +++ b/lib/ur/basis.urs @@ -664,11 +664,18 @@ val useMore : ctx ::: {Unit} -> use1 ::: {Type} -> use2 ::: {Type} con html = [Html] con head = [Head] -con body = [Dyn, Body] -con form = [Dyn, Body, Form] -con subform = [Dyn, Body, Subform] -con tabl = [Dyn, Table] -con tr = [Dyn, Tr] + +con body' = [MakeForm, Body] +con form' = [Body, Form] +con subform' = [Body, Subform] +con tabl' = [MakeForm, Table] +con tr' = [MakeForm, Tr] + +con body = [Dyn] ++ body' +con form = [Dyn] ++ form' +con subform = [Dyn] ++ subform' +con tabl = [Dyn] ++ tabl' +con tr = [Dyn] ++ tr' con xhtml = xml html con page = xhtml [] [] @@ -763,10 +770,10 @@ val img : bodyTag ([Alt = string, Src = url, Width = int, Height = int, Onload = transaction unit] ++ boxAttrs) val form : ctx ::: {Unit} -> bind ::: {Type} - -> [[Body, Form] ~ ctx] => + -> [[MakeForm, Form] ~ ctx] => option css_class - -> xml ([Body, Form] ++ ctx) [] bind - -> xml ([Body] ++ ctx) [] [] + -> xml ([Form] ++ ctx) [] bind + -> xml ([MakeForm] ++ ctx) [] [] val subform : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} -> [[Form] ~ ctx] => |