Parent

Class/Module Index [+]

Quicksearch

HTML5::InSelectPhase

Public Instance Methods

endTagOptgroup(name) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_select_phase.rb, line 45
def endTagOptgroup(name)
  # </optgroup> implicitly closes <option>
  if @tree.open_elements.last.name == 'option' and @tree.open_elements[-2].name == 'optgroup'
    @tree.open_elements.pop
  end
  # It also closes </optgroup>
  if @tree.open_elements.last.name == 'optgroup'
    @tree.open_elements.pop
  # But nothing else
  else
    parse_error("unexpected-end-tag-in-select",
            {"name" => "optgroup"})
  end
end
endTagOption(name) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_select_phase.rb, line 37
def endTagOption(name)
  if @tree.open_elements.last.name == 'option'
    @tree.open_elements.pop
  else
    parse_error("unexpected-end-tag-in-select", {"name" => "option"})
  end
end
endTagOther(name) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_select_phase.rb, line 80
def endTagOther(name)
  parse_error("unexpected-end-tag-in-select", {"name" => name})
end
endTagSelect(name) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_select_phase.rb, line 60
def endTagSelect(name)
  if in_scope?('select', true)
    remove_open_elements_until('select')

    @parser.reset_insertion_mode
  else
    # inner_html case
    parse_error
  end
end
endTagTableElements(name) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_select_phase.rb, line 71
def endTagTableElements(name)
  parse_error("unexpected-end-tag-in-select", {"name" => name})

  if in_scope?(name, true)
    endTagSelect('select')
    @parser.phase.processEndTag(name)
  end
end
processCharacters(data) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_select_phase.rb, line 12
def processCharacters(data)
  @tree.insertText(data)
end
startTagOptgroup(name, attributes) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_select_phase.rb, line 22
def startTagOptgroup(name, attributes)
  @tree.open_elements.pop if @tree.open_elements.last.name == 'option'
  @tree.open_elements.pop if @tree.open_elements.last.name == 'optgroup'
  @tree.insert_element(name, attributes)
end
startTagOption(name, attributes) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_select_phase.rb, line 16
def startTagOption(name, attributes)
  # We need to imply </option> if <option> is the current node.
  @tree.open_elements.pop if @tree.open_elements.last.name == 'option'
  @tree.insert_element(name, attributes)
end
startTagOther(name, attributes) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_select_phase.rb, line 33
def startTagOther(name, attributes)
  parse_error("unexpected-start-tag-in-select", {"name" => name})
end
startTagSelect(name, attributes) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_select_phase.rb, line 28
def startTagSelect(name, attributes)
  parse_error("unexpected-select-in-select")
  endTagSelect('select')
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.