Class: HTML5::TreeBuilders::Hpricot::TreeBuilder
Instance Attribute Summary
#activeFormattingElements, #document, #formPointer, #head_pointer, #insert_from_table, #open_elements
Instance Method Summary
collapse
#clearActiveFormattingElements, #createElement, #elementInActiveFormattingElements, #elementInScope, #generateImpliedEndTags, #getTableMisnestedNodePosition, #insertText, #insert_comment, #insert_element, #insert_elementNormal, #insert_elementTable, #insert_foreign_element, #reconstructActiveFormattingElements, #reset
Constructor Details
Returns a new instance of TreeBuilder.
Instance Method Details
#get_document ⇒ Object
219
220
221
|
# File 'lib/html5/treebuilders/hpricot.rb', line 219
def get_document
@document.hpricot
end
|
#get_fragment ⇒ Object
223
224
225
226
|
# File 'lib/html5/treebuilders/hpricot.rb', line 223
def get_fragment
@document = super
return @document.hpricot.children
end
|
#insertDoctype(name, public_id, system_id) ⇒ Object
210
211
212
213
|
# File 'lib/html5/treebuilders/hpricot.rb', line 210
def insertDoctype(name, public_id, system_id)
doctype = @doctypeClass.new(name, public_id, system_id)
@document.appendChild(doctype)
end
|
#testSerializer(node) ⇒ Object
215
216
217
|
# File 'lib/html5/treebuilders/hpricot.rb', line 215
def testSerializer(node)
node.printTree
end
|