# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_head_phase.rb, line 118 def anything_else if @tree.open_elements.last.name == 'head' endTagHead('head') else @parser.phase = @parser.phases[:afterHead] end end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_head_phase.rb, line 92 def endTagHead(name) if @tree.open_elements.last.name == 'head' @tree.open_elements.pop else parse_error("unexpected-end-tag", {"name" => "head"}) end @parser.phase = @parser.phases[:afterHead] end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_head_phase.rb, line 101 def endTagImplyAfterHead(name) anything_else @parser.phase.processEndTag(name) end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_head_phase.rb, line 114 def endTagOther(name) parse_error("unexpected-end-tag", {"name" => name}) end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_head_phase.rb, line 106 def endTagTitleStyleScriptNoscript(name) if @tree.open_elements.last.name == name @tree.open_elements.pop else parse_error("unexpected-end-tag", {"name" => name}) end end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_head_phase.rb, line 22 def processCharacters(data) if ]title style script noscript].include?(@tree.open_elements.last.name) @tree.insertText(data) else anything_else @parser.phase.processCharacters(data) end end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_head_phase.rb, line 13 def process_eof if ['title', 'style', 'script'].include?(name = @tree.open_elements.last.name) parse_error("expected-named-closing-tag-but-got-eof", {"name" => @tree.open_elements.last.name}) @tree.open_elements.pop end anything_else @parser.phase.process_eof end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_head_phase.rb, line 78 def startTagBaseLinkMeta(name, attributes) element = @tree.createElement(name, attributes) if @tree.head_pointer != nil and @parser.phase == @parser.phases[:inHead] appendToHead(element) else @tree.open_elements.last.appendChild(element) end end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_head_phase.rb, line 31 def startTagHead(name, attributes) parse_error("two-heads-are-not-better-than-one") end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_head_phase.rb, line 53 def startTagNoscript(name, attributes) # XXX Need to decide whether to implement the scripting disabled case. element = @tree.createElement(name, attributes) if @tree.head_pointer !=nil and @parser.phase == @parser.phases[:inHead] appendToHead(element) else @tree.open_elements.last.appendChild(element) end @tree.open_elements.push(element) @parser.tokenizer.content_model_flag = :CDATA end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_head_phase.rb, line 87 def startTagOther(name, attributes) anything_else @parser.phase.processStartTag(name, attributes) end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_head_phase.rb, line 65 def startTagScript(name, attributes) #XXX Inner HTML case may be wrong element = @tree.createElement(name, attributes) element._flags.push("parser-inserted") if @tree.head_pointer != nil and @parser.phase == @parser.phases[:inHead] appendToHead(element) else @tree.open_elements.last.appendChild(element) end @tree.open_elements.push(element) @parser.tokenizer.content_model_flag = :CDATA end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_head_phase.rb, line 42 def startTagStyle(name, attributes) element = @tree.createElement(name, attributes) if @tree.head_pointer != nil and @parser.phase == @parser.phases[:inHead] appendToHead(element) else @tree.open_elements.last.appendChild(element) end @tree.open_elements.push(element) @parser.tokenizer.content_model_flag = :CDATA end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_head_phase.rb, line 35 def startTagTitle(name, attributes) element = @tree.createElement(name, attributes) appendToHead(element) @tree.open_elements.push(element) @parser.tokenizer.content_model_flag = :RCDATA end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_head_phase.rb, line 128 def appendToHead(element) if @tree.head_pointer.nil? assert @parser.inner_html @tree.open_elements.last.appendChild(element) else @tree.head_pointer.appendChild(element) end end
Generated with the Darkfish Rdoc Generator 2.