Class: HTML5::XhmlRootPhase
- Inherits:
-
RootElementPhase
- Object
- Phase
- RootElementPhase
- HTML5::XhmlRootPhase
- Defined in:
- lib/html5/liberalxmlparser.rb
Instance Method Summary collapse
Methods inherited from RootElementPhase
#processCharacters, #processComment, #processEndTag, #processSpaceCharacters, #processStartTag, #process_eof
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
#insert_html_element ⇒ Object
105 106 107 108 109 110 |
# File 'lib/html5/liberalxmlparser.rb', line 105 def insert_html_element element = @tree.createElement("html", {'xmlns' => 'http://www.w3.org/1999/xhtml'}) @tree.open_elements.push(element) @tree.document.appendChild(element) @parser.phase = @parser.phases[:beforeHead] end |