Class: HTML5::AfterAfterBodyPhase

Inherits:
Phase
  • Object
show all
Defined in:
lib/html5/html5parser/after_after_body_phase.rb

Instance Method Summary collapse

Methods inherited from Phase

#adjust_foreign_attributes, #adjust_mathml_attributes, #assert, end_tag_handlers, handle_end, handle_start, #in_scope?, #initialize, #processEndTag, #processStartTag, #process_eof, #remove_open_elements_until, start_tag_handlers, tag_handlers

Constructor Details

This class inherits a constructor from HTML5::Phase

Instance Method Details

#endTagOther(name) ⇒ Object



30
31
32
33
34
# File 'lib/html5/html5parser/after_after_body_phase.rb', line 30

def endTagOther name
  parse_error("unexpected-end-tag", {'name' => name})
  @parser.phase = @parser.phases[:inBody]
  @parser.phase.processEndTag(name)
end

#processCharacters(data) ⇒ Object



36
37
38
39
40
# File 'lib/html5/html5parser/after_after_body_phase.rb', line 36

def processCharacters data
  parse_error "unexpected-char-after-body"
  @parser.phase = @parser.phases[:inBody]
  @parser.phase.processCharacters(data)
end

#processComment(data) ⇒ Object



8
9
10
# File 'lib/html5/html5parser/after_after_body_phase.rb', line 8

def processComment(data)
  @tree.insert_comment(data)
end

#processDoctype(data) ⇒ Object



12
13
14
# File 'lib/html5/html5parser/after_after_body_phase.rb', line 12

def processDoctype data
  @parser.phases[:inBody].processDoctype(data)
end

#processSpaceCharacters(data) ⇒ Object



16
17
18
# File 'lib/html5/html5parser/after_after_body_phase.rb', line 16

def processSpaceCharacters data
  @parser.phases[:inBody].processSpaceCharacters(data)
end

#startTagHtml(data) ⇒ Object



20
21
22
# File 'lib/html5/html5parser/after_after_body_phase.rb', line 20

def startTagHtml data
  @parser.phases[:inBody].startTagHtml(data)
end

#startTagOther(name, attributes) ⇒ Object



24
25
26
27
28
# File 'lib/html5/html5parser/after_after_body_phase.rb', line 24

def startTagOther name, attributes
  parse_error("unexpected-start-tag", {'name' => name})
  @parser.phase = @parser.phases[:inBody]
  @parser.phase.processStartTag(name, attributes)
end