Mercurial > urweb
annotate tests/dynClass.ur @ 2174:ce312cad5ecd
Use correct OpenSSL thread safety macros on OS X (closes #209)
Create an Autoconf test to determine if pthread_t is a pointer or scalar
type, and use the appropriate CRYPTO_THREADID_set macro based on the
result.
author | Benjamin Barenblat <bbaren at mit.edu> |
---|---|
date | Sun, 20 Sep 2015 17:46:07 -0400 |
parents | 2b2d07946e65 |
children |
rev | line source |
---|---|
adam@1751 | 1 style date |
adam@1751 | 2 style topic |
adam@1643 | 3 |
adam@1643 | 4 fun main () : transaction page = |
adam@1643 | 5 toggle <- source False; |
adam@1643 | 6 return <xml> |
adam@1643 | 7 <head> |
adam@1751 | 8 <link rel="stylesheet" type="text/css" href="http://adam.chlipala.net/style.css"/> |
adam@1643 | 9 </head> |
adam@1643 | 10 <body> |
adam@1751 | 11 <button dynClass={b <- signal toggle; |
adam@1751 | 12 return (if b then date else topic)} |
adam@1751 | 13 dynStyle={b <- signal toggle; |
adam@1751 | 14 return (if b then |
adam@1751 | 15 STYLE "width: 500px" |
adam@1751 | 16 else |
adam@1751 | 17 STYLE "width: 200px")} |
adam@2012 | 18 onclick={fn _ => b <- get toggle; set toggle (not b)}/> |
adam@1643 | 19 |
adam@1751 | 20 <button dynStyle={b <- signal toggle; |
adam@1751 | 21 return (if b then |
adam@1751 | 22 STYLE "width: 200px" |
adam@1751 | 23 else |
adam@1751 | 24 STYLE "width: 100px")}/> |
adam@1751 | 25 <button dynClass={b <- signal toggle; |
adam@1751 | 26 return (if b then |
adam@1751 | 27 topic |
adam@1751 | 28 else |
adam@1751 | 29 date)}/> |
adam@1643 | 30 </body> |
adam@1643 | 31 </xml> |