Mercurial > urweb
annotate tests/treeDyn.ur @ 2062:795b5b75453c
Add 'role' data attribute.
Note, that 'role' attribute is a part of reach ARIA API described here:
http://www.w3.org/TR/wai-aria/
Among 'role', it defines lots of aria-* attributes
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Mon, 07 Jul 2014 10:05:04 +0400 |
parents | aa2398e58306 |
children |
rev | line source |
---|---|
adam@1457 | 1 table t : {Id : int, Parent : option int} |
adam@1457 | 2 |
adam@1457 | 3 fun recurse (root : option int) = |
adam@1457 | 4 queryX' (SELECT * FROM t WHERE {eqNullable' (SQL t.Parent) root}) |
adam@1457 | 5 (fn r => |
adam@1457 | 6 children <- recurse (Some r.T.Id); |
adam@1457 | 7 (*s <- source False;*) |
adam@1457 | 8 return <xml> |
adam@1457 | 9 <dyn signal={(*v <- signal s; |
adam@1457 | 10 if v then*) |
adam@1457 | 11 return <xml><b>HI</b>{children}<b>BYE</b></xml> |
adam@1457 | 12 (*else |
adam@1457 | 13 return <xml/>*)}/> |
adam@1457 | 14 </xml>) |
adam@1457 | 15 |
adam@1457 | 16 fun main () = |
adam@1457 | 17 x <- recurse None; |
adam@1457 | 18 return <xml><body>{x}</body></xml> |