# File lib/html5/html5parser/in_body_phase.rb, line 343
    def endTagBody(name)
      # XXX Need to take open <p> tags into account here. We shouldn't imply
      # </p> but we should not throw a parse error either. Specification is
      # likely to be updated.
      unless @tree.open_elements[1].name == 'body'
        # inner_html case
        parse_error
        return
      end
      unless @tree.open_elements.last.name == 'body'
        parse_error("expected-one-end-tag-but-got-another",
                {"expectedName" => "body",
                 "gotName" => @tree.open_elements.last.name})
      end
      @parser.phase = @parser.phases[:afterBody]
    end