Class: HTML5::AfterHeadPhase

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

Instance Method Summary collapse

Methods inherited from Phase

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

Constructor Details

This class inherits a constructor from HTML5::Phase

Instance Method Details

#anything_elseObject



44
45
46
47
# File 'lib/feed_tools/vendor/html5/lib/html5/html5parser/after_head_phase.rb', line 44

def anything_else
  @tree.insert_element('body', {})
  @parser.phase = @parser.phases[:inBody]
end

#process_eofObject



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

def process_eof
  anything_else
  @parser.phase.process_eof
end

#processCharacters(data) ⇒ Object



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

def processCharacters(data)
  anything_else
  @parser.phase.processCharacters(data)
end

#processEndTag(name) ⇒ Object



39
40
41
42
# File 'lib/feed_tools/vendor/html5/lib/html5/html5parser/after_head_phase.rb', line 39

def processEndTag(name)
  anything_else
  @parser.phase.processEndTag(name)
end

#startTagBody(name, attributes) ⇒ Object



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

def startTagBody(name, attributes)
  @tree.insert_element(name, attributes)
  @parser.phase = @parser.phases[:inBody]
end

#startTagFrameset(name, attributes) ⇒ Object



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

def startTagFrameset(name, attributes)
  @tree.insert_element(name, attributes)
  @parser.phase = @parser.phases[:inFrameset]
end

#startTagFromHead(name, attributes) ⇒ Object



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

def startTagFromHead(name, attributes)
  parse_error("unexpected-start-tag-out-of-my-head", {"name" => name})
  @parser.phase = @parser.phases[:inHead]
  @parser.phase.processStartTag(name, attributes)
end

#startTagOther(name, attributes) ⇒ Object



34
35
36
37
# File 'lib/feed_tools/vendor/html5/lib/html5/html5parser/after_head_phase.rb', line 34

def startTagOther(name, attributes)
  anything_else
  @parser.phase.processStartTag(name, attributes)
end