class Gammo::Parser::AfterAfterBody

Section 12.2.6.4.22.

Public Instance Methods

comment_token(token) click to toggle source
# File lib/gammo/parser/insertion_mode/after_after_body.rb, line 21
def comment_token(token)
  parser.document.append_child Node::Comment.new(data: token.data)
  halt true
end
default(_) click to toggle source
# File lib/gammo/parser/insertion_mode/after_after_body.rb, line 30
def default(_)
  parser.insertion_mode = InBody
  halt false
end
doctype_token(token) click to toggle source
# File lib/gammo/parser/insertion_mode/after_after_body.rb, line 26
def doctype_token(token)
  halt InBody.new(parser).process
end
error_token(_) click to toggle source
# File lib/gammo/parser/insertion_mode/after_after_body.rb, line 5
def error_token(_)
  # ignore the token
  halt true
end
start_tag_token(token) click to toggle source
# File lib/gammo/parser/insertion_mode/after_after_body.rb, line 14
def start_tag_token(token)
  case token.tag
  when Tags::Html
    halt InBody.new(parser).process
  end
end
text_token(token) click to toggle source
# File lib/gammo/parser/insertion_mode/after_after_body.rb, line 10
def text_token(token)
  halt InBody.new(parser).process if token.data.lstrip.length.zero?
end