class Gammo::Parser::InFrameset
Section 12.2.6.4.20.
Public Instance Methods
comment_token(token)
click to toggle source
# File lib/gammo/parser/insertion_mode/in_frameset.rb, line 5 def comment_token(token) parser.add_child Node::Comment.new(data: token.data) end
default(_)
click to toggle source
# File lib/gammo/parser/insertion_mode/in_frameset.rb, line 42 def default(_) # ignore the token halt true end
end_tag_token(token)
click to toggle source
# File lib/gammo/parser/insertion_mode/in_frameset.rb, line 29 def end_tag_token(token) case token.tag when Tags::Frameset if parser.open_elements.last.tag != Tags::Html parser.open_elements.pop if parser.open_elements.last.tag != Tags::Frameset parser.insertion_mode = AfterFrameset halt true end end end end
start_tag_token(token)
click to toggle source
# File lib/gammo/parser/insertion_mode/in_frameset.rb, line 14 def start_tag_token(token) case token.tag when Tags::Html halt InBody.new(parser).process when Tags::Frameset parser.add_element when Tags::Frame parser.add_element parser.open_elements.pop parser.acknowledge_self_closing_tag when Tags::Noframes halt InHead.new(parser).process end end
text_token(token)
click to toggle source
# File lib/gammo/parser/insertion_mode/in_frameset.rb, line 9 def text_token(token) text = token.data.each_char.with_object(String.new) { |c, s| s << c if c == ?\s } parser.add_text(text) if text != '' end