Class: HTML5::XmlElementPhase
- Inherits:
-
Phase
- Object
- Phase
- HTML5::XmlElementPhase
show all
- Defined in:
- lib/html5/liberalxmlparser.rb
Instance Method Summary
collapse
Methods inherited from Phase
#assert, end_tag_handlers, handle_end, handle_start, #in_scope?, #initialize, #processComment, #processDoctype, #processEndTag, #processSpaceCharacters, #processStartTag, #process_eof, #remove_open_elements_until, #startTagHtml, start_tag_handlers, tag_handlers
Constructor Details
This class inherits a constructor from HTML5::Phase
Instance Method Details
#endTagOther(name) ⇒ Object
142
143
144
145
146
147
148
149
150
151
|
# File 'lib/html5/liberalxmlparser.rb', line 142
def endTagOther(name)
for node in @tree.open_elements.reverse
if node.name == name
{} while @tree.open_elements.pop != node
break
else
parse_error
end
end
end
|
#processCharacters(data) ⇒ Object
153
154
155
|
# File 'lib/html5/liberalxmlparser.rb', line 153
def processCharacters(data)
@tree.insertText(data)
end
|
#startTagOther(name, attributes) ⇒ Object
136
137
138
139
140
|
# File 'lib/html5/liberalxmlparser.rb', line 136
def startTagOther(name, attributes)
element = @tree.createElement(name, attributes)
@tree.open_elements[-1].appendChild(element)
@tree.open_elements.push(element)
end
|