Class: HTML5::TrailingEndPhase

Inherits:
Phase
  • Object
show all
Defined in:
lib/feed_tools/vendor/html5/lib/html5/html5parser/trailing_end_phase.rb

Instance Method Summary collapse

Methods inherited from Phase

#assert, end_tag_handlers, handle_end, handle_start, #in_scope?, #initialize, #processDoctype, #remove_open_elements_until, #startTagHtml, start_tag_handlers, tag_handlers

Constructor Details

This class inherits a constructor from HTML5::Phase

Instance Method Details

#process_eofObject



6
7
# File 'lib/feed_tools/vendor/html5/lib/html5/html5parser/trailing_end_phase.rb', line 6

def process_eof
end

#processCharacters(data) ⇒ Object



17
18
19
20
21
# File 'lib/feed_tools/vendor/html5/lib/html5/html5parser/trailing_end_phase.rb', line 17

def processCharacters(data)
  parse_error("expected-eof-but-got-char")
  @parser.phase = @parser.last_phase
  @parser.phase.processCharacters(data)
end

#processComment(data) ⇒ Object



9
10
11
# File 'lib/feed_tools/vendor/html5/lib/html5/html5parser/trailing_end_phase.rb', line 9

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

#processEndTag(name) ⇒ Object



29
30
31
32
33
# File 'lib/feed_tools/vendor/html5/lib/html5/html5parser/trailing_end_phase.rb', line 29

def processEndTag(name)
  parse_error("expected-eof-but-got-end-tag", {"name" => name})
  @parser.phase = @parser.last_phase
  @parser.phase.processEndTag(name)
end

#processSpaceCharacters(data) ⇒ Object



13
14
15
# File 'lib/feed_tools/vendor/html5/lib/html5/html5parser/trailing_end_phase.rb', line 13

def processSpaceCharacters(data)
  @parser.last_phase.processSpaceCharacters(data)
end

#processStartTag(name, attributes) ⇒ Object



23
24
25
26
27
# File 'lib/feed_tools/vendor/html5/lib/html5/html5parser/trailing_end_phase.rb', line 23

def processStartTag(name, attributes)
  parse_error("expected-eof-but-got-start-tag", {"name" => name})
  @parser.phase = @parser.last_phase
  @parser.phase.processStartTag(name, attributes)
end