summaryrefslogtreecommitdiff
path: root/lib/ur
diff options
context:
space:
mode:
authorGravatar Vladimir Shabanov <vshabanoff@gmail.com>2012-04-11 03:03:19 +0400
committerGravatar Vladimir Shabanov <vshabanoff@gmail.com>2012-04-11 03:03:19 +0400
commita3b76356a251d556225e436a268e53af53daba1f (patch)
tree32ce1876ac382eee25fd0b46b8fa5d7b627b3f05 /lib/ur
parente926ef3ae0ea08fc24af567b0b2c74f083cdb64d (diff)
Added several missing tag attributes
Diffstat (limited to 'lib/ur')
-rw-r--r--lib/ur/basis.urs11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs
index 189bef0e..60a95db6 100644
--- a/lib/ur/basis.urs
+++ b/lib/ur/basis.urs
@@ -716,7 +716,7 @@ val head : unit -> tag [] html head [] []
val title : unit -> tag [] head [] [] []
val link : unit -> tag [Id = id, Rel = string, Typ = string, Href = url, Media = string] head [] [] []
-val body : unit -> tag [Onload = transaction unit, Onresize = transaction unit, Onunload = transaction unit]
+val body : unit -> tag [Onload = transaction unit, Onresize = transaction unit, Onunload = transaction unit, Onhashchange = transaction unit]
html body [] []
con bodyTag = fn (attrs :: {Type}) =>
ctx ::: {Unit} ->
@@ -738,11 +738,12 @@ con keyEvents = [Onkeydown = int -> transaction unit, Onkeypress = int -> transa
Onkeyup = int -> transaction unit]
(* Key arguments are character codes. *)
con resizeEvents = [Onresize = transaction unit]
+con scrollEvents = [Onscroll = transaction unit]
-con boxEvents = focusEvents ++ mouseEvents ++ keyEvents ++ resizeEvents
+con boxEvents = focusEvents ++ mouseEvents ++ keyEvents ++ resizeEvents ++ scrollEvents
con tableEvents = focusEvents ++ mouseEvents ++ keyEvents
-con boxAttrs = [Id = id, Title = string] ++ boxEvents
+con boxAttrs = [Id = id, Title = string, Style = string] ++ boxEvents
con tableAttrs = [Id = id, Title = string] ++ tableEvents
val span : bodyTag boxAttrs
@@ -803,7 +804,7 @@ con formTag = fn (ty :: Type) (inner :: {Unit}) (attrs :: {Type}) =>
nm :: Name -> unit
-> tag attrs ([Form] ++ ctx) inner [] [nm = ty]
val hidden : formTag string [] [Id = string, Value = string]
-val textbox : formTag string [] ([Value = string, Size = int, Source = source string, Onchange = transaction unit,
+val textbox : formTag string [] ([Value = string, Size = int, Placeholder = string, Source = source string, Onchange = transaction unit,
Ontext = transaction unit] ++ boxAttrs)
val password : formTag string [] ([Value = string, Size = int] ++ boxAttrs)
val textarea : formTag string [] ([Rows = int, Cols = int, Onchange = transaction unit,
@@ -859,7 +860,7 @@ con cformTag = fn (attrs :: {Type}) (inner :: {Unit}) =>
-> [[Body] ~ ctx] =>
unit -> tag attrs ([Body] ++ ctx) inner [] []
-val ctextbox : cformTag ([Value = string, Size = int, Source = source string, Onchange = transaction unit,
+val ctextbox : cformTag ([Value = string, Size = int, Source = source string, Placeholder = string, Onchange = transaction unit,
Ontext = transaction unit] ++ boxAttrs) []
val button : cformTag ([Value = string] ++ boxAttrs) []