From 59422a36cdbaea81b2980f9c993b8dedaffb63c3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Christophe=20Beaupr=C3=A9?= Date: Sat, 20 Dec 2014 18:54:03 -0500 Subject: [PATCH] html: Add missing documentation. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jean-Christophe Beaupré --- lib/html/html.nit | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/html/html.nit b/lib/html/html.nit index 83ff255..8d2de2b 100644 --- a/lib/html/html.nit +++ b/lib/html/html.nit @@ -84,10 +84,13 @@ class HTMLPage end end +# An HTML element. class HTMLTag super Streamable - # HTML tagname: 'div' for
+ # HTML element type. + # + # `"div"` for `
`. var tag: String init do self.is_void = (once ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]).has(tag) @@ -99,6 +102,7 @@ class HTMLTag # assert (new HTMLTag("p")).is_void == false var is_void: Bool is noinit + # Create a HTML elements with the specifed type and attributes. init with_attrs(tag: String, attrs: Map[String, String]) do self.tag = tag self.attrs = attrs -- 1.7.9.5