Mercurial > urweb
comparison tests/data_attr.ur @ 2008:93ff76058825
HTML5 data-* attributes
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 02 May 2014 15:32:10 -0400 |
parents | |
children | 6be31671911b |
comparison
equal
deleted
inserted
replaced
2007:d3a0f2b8af28 | 2008:93ff76058825 |
---|---|
1 fun dynd r = return <xml><body> | |
2 <div data={data_attr r.Attr r.Value}>How about that?</div> | |
3 </body></xml> | |
4 | |
5 fun main () : transaction page = | |
6 s <- source <xml/>; | |
7 a <- source ""; | |
8 v <- source ""; | |
9 return <xml><body> | |
10 <div data-foo="hi" data-bar="bye" data-baz="why">Whoa there, cowboy!</div> | |
11 | |
12 <hr/> | |
13 | |
14 <form> | |
15 <textbox{#Attr}/> = <textbox{#Value}/> | |
16 <submit action={dynd}/> | |
17 </form> | |
18 | |
19 <hr/> | |
20 | |
21 <ctextbox source={a}/> = <ctextbox source={v}/> | |
22 <button onclick={fn _ => | |
23 a <- get a; v <- get v; set s <xml><div data={data_attr a v}>OHO!</div></xml>}/> | |
24 <hr/> | |
25 <dyn signal={signal s}/> | |
26 </body></xml> |