Class: HTML5::InSelectInTablePhase

Inherits:
Phase
  • Object
show all
Defined in:
lib/html5/html5parser/in_select_table_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, #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



31
32
33
# File 'lib/html5/html5parser/in_select_table_phase.rb', line 31

def endTagOther(name)
 @parser.phases[:inSelect].processEndTag(name)
end

#endTagTable(name) ⇒ Object



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

def endTagTable(name)
  @parser.parse_error("unexpected-table-element-end-tag-in-select-in-table", {:name => name})
  if @tree.elementInScope(name, true)
    endTagOther("select")
    @parser.phase.processEndTag(name)
  end
end

#processCharacters(data) ⇒ Object



9
10
11
# File 'lib/html5/html5parser/in_select_table_phase.rb', line 9

def processCharacters(data)
  @parser.phases[:inSelect].processCharacters(data)
end

#startTagOther(name, attributes) ⇒ Object



19
20
21
# File 'lib/html5/html5parser/in_select_table_phase.rb', line 19

def startTagOther(name, attributes)
  @parser.phases[:inSelect].processStartTag(name, attributes)
end

#startTagTable(name, attributes) ⇒ Object



13
14
15
16
17
# File 'lib/html5/html5parser/in_select_table_phase.rb', line 13

def startTagTable(name, attributes)
  @parser.parse_error("unexpected-table-element-start-tag-in-select-in-table", {:name => name})
  endTagOther("select")
  @parser.phase.processStartTag(name, attributes)
end