require 'html5/html5parser/phase' module HTML5 class InSelectPhase < Phase # http://www.whatwg.org/specs/web-apps/current-work/#in-select handle_start 'html', 'option', 'optgroup', 'select' handle_end 'option', 'optgroup', 'select', %w( caption table tbody tfoot thead tr td th ) => 'TableElements' def processCharacters(data) @tree.insertText(data) end def startTagOption(name, attributes) # We need to imply if