diff --git a/web/CXM_making_a_web_site.anubis b/web/CXM_making_a_web_site.anubis index 233114d..bbaea03 100644 --- a/web/CXM_making_a_web_site.anubis +++ b/web/CXM_making_a_web_site.anubis @@ -743,7 +743,9 @@ public type CoreAttrs: accesskey (Word8), tabindex (Int), attr (String, String), - event (HtmlEvents, String). + event (HtmlEvents, String), + //HTML5 + data (String name, String value). public define CoreAttrs attr(String name, Bool value) = attr(name, if value then "true" else "false"). @@ -3288,16 +3290,18 @@ public define String rtl then " dir=rtl" }, - accesskey(key) then + accesskey(key) then " accesskey=\"" + key + "\"", - tabindex(index) then + tabindex(index) then " tabindex=\"" + index + "\"", attr(name, value) then " " + name + "=\"" + value + "\"", - event(e, value) then + event(e, value) then " " + event_name(e) + "=\"" + value + "\"", + data(name, value) then + " data-" + to_lower(name) + "=\"" + value + "\"", }, current + format_attrs(t) }. @@ -4308,7 +4312,8 @@ define Printable_tree [""], partial(p_content) then if p_content is partial_content(tags, html_elements) then - head_tags <- tags + *head_tags; + head_tags <- *head_tags + tags; + format(cinfo, sn, ic_v, html_elements, is_https, action_count, head_tags) }. @@ -4497,7 +4502,7 @@ define Printable_tree format(cinfo, sn, ic_v, any_div(options, e), format_element, is_https, action_count, head_tags), div(options, p_content) then if p_content is partial_content(tags, html_elements) then - head_tags <- tags + *head_tags; + head_tags <- *head_tags +tags; format(cinfo, sn, ic_v, any_div(options, html_elements), format_element, is_https, action_count, head_tags), div_empty(options) then format(cinfo, sn, ic_v, any_div_empty(options), format_element, is_https, action_count, head_tags), @@ -4518,7 +4523,7 @@ define Printable_tree ], partial(p_content) then if p_content is partial_content(tags, html_elements) then - head_tags <- tags + *head_tags; + head_tags <- *head_tags + tags; format(cinfo, sn, ic_v, html_elements, is_https, action_count, head_tags) }. -- libgit2 0.21.4