diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-05-06 16:08:48 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-05-06 16:08:48 -0400 |
commit | b9634e3475a851640db7ddf93bb29e7778bc9e34 (patch) | |
tree | a956507879ff7df344774dc30dabdc5438d4cb63 /tests | |
parent | e1ea17cb21e3193a99cfd93d7e264ba0176f66f5 (diff) |
Run-time CSS style validation
Diffstat (limited to 'tests')
-rw-r--r-- | tests/styleRt.ur | 38 | ||||
-rw-r--r-- | tests/styleRt.urp | 4 | ||||
-rw-r--r-- | tests/styleRt.urs | 1 |
3 files changed, 43 insertions, 0 deletions
diff --git a/tests/styleRt.ur b/tests/styleRt.ur new file mode 100644 index 00000000..583649a1 --- /dev/null +++ b/tests/styleRt.ur @@ -0,0 +1,38 @@ +fun handler r = + return <xml><body> + <span style={oneProperty + (oneProperty noStyle (value (property r.Prop) (atom r.Valu))) + (value (property "background") (css_url (bless r.Url)))}> + Teeeest + </span> + </body></xml> + +fun main () = + prop <- source ""; + valu <- source ""; + url <- source ""; + xm <- source <xml/>; + return <xml><body> + Property: <ctextbox source={prop}/><br/> + Value: <ctextbox source={valu}/><br/> + URL: <ctextbox source={url}/><br/> + <button value="Go!" onclick={prop <- get prop; + valu <- get valu; + url <- get url; + set xm <xml><span style={oneProperty + (oneProperty noStyle (value (property prop) (atom valu))) + (value (property "background") (css_url (bless url)))}> + Teeeest + </span></xml>}/> + <hr/> + <dyn signal={signal xm}/> + <hr/> + <h2>Or the old fashioned way...</h2> + + <form> + Property: <textbox{#Prop}/><br/> + Value: <textbox{#Valu}/><br/> + URL: <textbox{#Url}/><br/> + <submit action={handler}/> + </form> + </body></xml> diff --git a/tests/styleRt.urp b/tests/styleRt.urp new file mode 100644 index 00000000..42e5f024 --- /dev/null +++ b/tests/styleRt.urp @@ -0,0 +1,4 @@ +rewrite all StyleRt/* +allow url http://www.google.com/* + +styleRt diff --git a/tests/styleRt.urs b/tests/styleRt.urs new file mode 100644 index 00000000..901d6bf2 --- /dev/null +++ b/tests/styleRt.urs @@ -0,0 +1 @@ +val main : {} -> transaction page |