Skip to content

Commit f27c80f

Browse files
committed
readonly is a presence attribute
1 parent 7c0612a commit f27c80f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/rascal/salix/HTML.rsc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ data Msg;
2020
void text(value v) = _text(v);
2121

2222

23+
2324
@doc{The element render functions below all call build
2425
to interpret the list of values; build will call the
2526
second argument (_h1 etc.) to construct the actual
@@ -184,7 +185,7 @@ Attr multiple(bool val) = val ? attr("multiple", "<val>") : null();
184185
Attr name(str val) = attr("name", val);
185186
Attr novalidate(bool val) = attr("novalidate", "<val>");
186187
Attr pattern(str val) = attr("pattern", val);
187-
Attr readonly(bool val) = attr("readonly", "<val>");
188+
Attr readonly(bool val) = val ? attr("readonly", "<val>") : null();
188189
Attr required(bool val) = attr("required", "<val>");
189190
Attr size(int val) = attr("size", "<val>");
190191
Attr \for(str val) = attr("for", val);

0 commit comments

Comments
 (0)