class

JustHTML::TreeBuilder

Inherits JustHTML::TokenSink < Reference < Object

Constants

FORMATTING_ELEMENTS = {"a", "b", "big", "code", "em", "font", "i", "nobr", "s", "small", "strike", "strong", "tt", "u"}

Formatting elements that use the adoption agency algorithm

TABLE_ALLOWED_CHILDREN = {"caption", "colgroup", "tbody", "tfoot", "thead", "tr", "td", "th", "script", "template", "style"}

Elements allowed as children of table-related elements (not foster parented)

TABLE_FOSTER_TARGETS = {"table", "tbody", "tfoot", "thead", "tr"}

Elements that are targets for foster parenting

Constructors

new(collect_errors : Bool = false, fragment_context : FragmentContext | Nil = nil)
Source

Class methods

parse(html : String, collect_errors : Bool = false) : Document
Source
parse_fragment(html : String, context : String = "body", context_namespace : String | Nil = nil, collect_errors : Bool = false) : DocumentFragment
Source

Instance methods

document
Source
errors
Source
open_elements
Source
process_characters(data : String) : Nil
Source
process_comment(comment : CommentToken) : Nil
Source
process_doctype(doctype : Doctype) : Nil
Source
process_eof
Source
process_tag(tag : Tag) : Nil
Source
set_tokenizer(tokenizer : Tokenizer) : Nil
Source

Nested types