Class: FormElements::Legend

Inherits:
ContainerElement
  • Object
show all
Defined in:
lib/reparcs/elements/form_elements.rb

Overview

A Legend element

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Legend

Creates a new Legend element, takes an optional hash of attributes as parameter.



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/reparcs/elements/form_elements.rb', line 128

def initialize(attrs={})
  aattrs = [
    "class", "id", "title", "dir", "xml:lang",
    "onclick", "ondblclick", "onkeydown", "onkeypress",
    "onkeyup", "onmousedown", "onmousemove", "onmouseout",
    "onmouseover", "onmouseup", "accesskey", "charset"
  ]
  childs = [
    "a", "abbr", "acronym", "b", "bdo", "big", "br", "button",
    "cite", "code", "del", "dfn", "em", "i", "img", "input",
    "ins", "kbd", "label", "map", "object", "q", "samp",
    "script", "select", "small", "span", "strong", "sub",
    "sup", "textarea", "tt", "var"
  ]
  super("legend", aattrs, childs, attrs)
  @start_element = "<legend"
  @end_element = "</legend>"
end