diff --git a/web/CXM_making_a_web_site.anubis b/web/CXM_making_a_web_site.anubis index fcbef37..4db5113 100644 --- a/web/CXM_making_a_web_site.anubis +++ b/web/CXM_making_a_web_site.anubis @@ -753,6 +753,7 @@ public type CoreAttrs: public define CoreAttrs attr(String name, Bool value) = attr(name, if value then "true" else "false"). public type InputAttrs: + id (String), class (String), style (String), title (String), @@ -761,7 +762,9 @@ public type InputAttrs: accesskey (Word8), tabindex (Int), attr (String, String), - event (HtmlEvents, String). + event (HtmlEvents, String), + //HTML5 + data (String name, String value). public define InputAttrs attr(String name, Bool value) = attr(name, if value then "true" else "false"). @@ -3225,6 +3228,8 @@ define String [h . t] then with current = if h is { + id(id_name) then + " id=\"" + id_name + "\"", class(class_name) then format_attrs(t, [class_name. classes], styles), style(style_string) then @@ -3251,6 +3256,8 @@ define String event(e, value) then " " + event_name(e) + "=\"" + value + "\"", + data(name, value) then + " data-" + to_lower(name) + "=\"" + value + "\"", }, current + format_attrs(t, classes, styles) }. -- libgit2 0.21.4