-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhtml.l
More file actions
50 lines (47 loc) · 954 Bytes
/
Copy pathhtml.l
File metadata and controls
50 lines (47 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
(undef '<button>)
(de <input> (Attr Type Name Value)
(prin "<input")
(and Attr (htStyle @))
(prin " type=\"")
(ht:Prin Type)
(prin "\" name=\"")
(ht:Prin Name)
(prin "\" value=\"")
(ht:Prin Value)
(prin "\"/>")
)
(de <button> (Attr Type Name Value . Prg)
(prin "<button")
(and Attr (htStyle @))
(prin " type=\"")
(ht:Prin Type)
(prin "\" name=\"")
(ht:Prin Name)
(prin "\" value=\"")
(ht:Prin Value)
(prin "\"")
(prin ">")
(if (atom Prg)
(ht:Prin (eval Prg Ofs))
(for X Prg
(if (atom X)
(ht:Prin (eval X Ofs))
(eval X Ofs) ) ) )
(prin "</button>")
)
(de <form> (Attr Method Action . Prg)
(prin "<form")
(and Attr (htStyle @))
(when Method
(prin " method=\"") (ht:Prin @) (prin "\"") )
(when Action
(prin " action=\"") (ht:Prin @) (prin "\"") )
(prin ">")
(if (atom Prg)
(ht:Prin (eval Prg Ofs))
(for X Prg
(if (atom X)
(ht:Prin (eval X Ofs))
(eval X Ofs) ) ) )
(prin "</form>")
(prinl) )