Mercurial > urweb
comparison lib/ur/basis.urs @ 1642:c3627f317bfd
Refactor HTML contexts to prevent some illegal nestings (that can crash the JavaScript runtime system)
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Tue, 20 Dec 2011 21:06:25 -0500 |
parents | 68429cfce8db |
children | b0720700c36e |
comparison
equal
deleted
inserted
replaced
1641:68429cfce8db | 1642:c3627f317bfd |
---|---|
662 xml ctx use1 bind | 662 xml ctx use1 bind |
663 -> xml ctx (use1 ++ use2) bind | 663 -> xml ctx (use1 ++ use2) bind |
664 | 664 |
665 con html = [Html] | 665 con html = [Html] |
666 con head = [Head] | 666 con head = [Head] |
667 con body = [Dyn, Body] | 667 |
668 con form = [Dyn, Body, Form] | 668 con body' = [MakeForm, Body] |
669 con subform = [Dyn, Body, Subform] | 669 con form' = [Body, Form] |
670 con tabl = [Dyn, Table] | 670 con subform' = [Body, Subform] |
671 con tr = [Dyn, Tr] | 671 con tabl' = [MakeForm, Table] |
672 con tr' = [MakeForm, Tr] | |
673 | |
674 con body = [Dyn] ++ body' | |
675 con form = [Dyn] ++ form' | |
676 con subform = [Dyn] ++ subform' | |
677 con tabl = [Dyn] ++ tabl' | |
678 con tr = [Dyn] ++ tr' | |
672 | 679 |
673 con xhtml = xml html | 680 con xhtml = xml html |
674 con page = xhtml [] [] | 681 con page = xhtml [] [] |
675 con xbody = xml body [] [] | 682 con xbody = xml body [] [] |
676 con xtable = xml tabl [] [] | 683 con xtable = xml tabl [] [] |
761 val img : bodyTag ([Alt = string, Src = url, Width = int, Height = int, | 768 val img : bodyTag ([Alt = string, Src = url, Width = int, Height = int, |
762 Onabort = transaction unit, Onerror = transaction unit, | 769 Onabort = transaction unit, Onerror = transaction unit, |
763 Onload = transaction unit] ++ boxAttrs) | 770 Onload = transaction unit] ++ boxAttrs) |
764 | 771 |
765 val form : ctx ::: {Unit} -> bind ::: {Type} | 772 val form : ctx ::: {Unit} -> bind ::: {Type} |
766 -> [[Body, Form] ~ ctx] => | 773 -> [[MakeForm, Form] ~ ctx] => |
767 option css_class | 774 option css_class |
768 -> xml ([Body, Form] ++ ctx) [] bind | 775 -> xml ([Form] ++ ctx) [] bind |
769 -> xml ([Body] ++ ctx) [] [] | 776 -> xml ([MakeForm] ++ ctx) [] [] |
770 | 777 |
771 val subform : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} | 778 val subform : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} |
772 -> [[Form] ~ ctx] => | 779 -> [[Form] ~ ctx] => |
773 nm :: Name -> [[nm] ~ use] => | 780 nm :: Name -> [[nm] ~ use] => |
774 xml ([Form] ++ ctx) [] bind | 781 xml ([Form] ++ ctx) [] bind |