method
element_init
v1_8_7_72 -
Show latest stable
- Class:
CGI::Html4Tr
element_init()public
Initialise the HTML generation methods for this version.
# File lib/cgi.rb, line 2190
def element_init
extend TagMaker
methods = ""
# - -
for element in %w[ TT I B U S STRIKE BIG SMALL EM STRONG DFN
CODE SAMP KBD VAR CITE ABBR ACRONYM FONT SUB SUP SPAN BDO
ADDRESS DIV CENTER MAP OBJECT APPLET H1 H2 H3 H4 H5 H6 PRE Q
INS DEL DL OL UL DIR MENU LABEL SELECT OPTGROUP FIELDSET
LEGEND BUTTON TABLE IFRAME NOFRAMES TITLE STYLE SCRIPT
NOSCRIPT TEXTAREA FORM A BLOCKQUOTE CAPTION ]
methods += "def \#{element.downcase}(attributes = {})\n" + nn_element_def(element) + "end\n"
end
# - O EMPTY
for element in %w[ IMG BASE BASEFONT BR AREA LINK PARAM HR INPUT
COL ISINDEX META ]
methods += "def \#{element.downcase}(attributes = {})\n" + nOE_element_def(element) + "end\n"
end
# O O or - O
for element in %w[ HTML BODY P DT DD LI OPTION THEAD TFOOT TBODY
COLGROUP TR TH TD HEAD ]
methods += "def \#{element.downcase}(attributes = {})\n" + nO_element_def(element) + "end\n"
end
eval(methods)
end Related methods
- Instance methods
- doctype
- element_init