Class: HTML5::BeforeHeadPhase
- Inherits:
-
Phase
- Object
- Phase
- HTML5::BeforeHeadPhase
show all
- Defined in:
- lib/feed_tools/vendor/html5/lib/html5/html5parser/before_head_phase.rb
Instance Method Summary
collapse
Methods inherited from Phase
#assert, end_tag_handlers, handle_end, handle_start, #in_scope?, #initialize, #processComment, #processDoctype, #processEndTag, #processSpaceCharacters, #processStartTag, #remove_open_elements_until, #startTagHtml, start_tag_handlers, tag_handlers
Constructor Details
This class inherits a constructor from HTML5::Phase
Instance Method Details
#endTagImplyHead(name) ⇒ Object
31
32
33
34
|
# File 'lib/feed_tools/vendor/html5/lib/html5/html5parser/before_head_phase.rb', line 31
def endTagImplyHead(name)
startTagHead('head', {})
@parser.phase.processEndTag(name)
end
|
#endTagOther(name) ⇒ Object
36
37
38
|
# File 'lib/feed_tools/vendor/html5/lib/html5/html5parser/before_head_phase.rb', line 36
def endTagOther(name)
parse_error("end-tag-after-implied-root", {"name" => name})
end
|
#process_eof ⇒ Object
10
11
12
13
|
# File 'lib/feed_tools/vendor/html5/lib/html5/html5parser/before_head_phase.rb', line 10
def process_eof
startTagHead('head', {})
@parser.phase.process_eof
end
|
#processCharacters(data) ⇒ Object
15
16
17
18
|
# File 'lib/feed_tools/vendor/html5/lib/html5/html5parser/before_head_phase.rb', line 15
def processCharacters(data)
startTagHead('head', {})
@parser.phase.processCharacters(data)
end
|
#startTagHead(name, attributes) ⇒ Object
20
21
22
23
24
|
# File 'lib/feed_tools/vendor/html5/lib/html5/html5parser/before_head_phase.rb', line 20
def startTagHead(name, attributes)
@tree.insert_element(name, attributes)
@tree.head_pointer = @tree.open_elements[-1]
@parser.phase = @parser.phases[:inHead]
end
|
#startTagOther(name, attributes) ⇒ Object
26
27
28
29
|
# File 'lib/feed_tools/vendor/html5/lib/html5/html5parser/before_head_phase.rb', line 26
def startTagOther(name, attributes)
startTagHead('head', {})
@parser.phase.processStartTag(name, attributes)
end
|