Combo.HTMLTest (combo v0.10.0)
View SourceProvides helpers for testing HTML.
All these helpers converts different data structure into a tree structure, which represents the essential structure of HTML.
The tree structure is abbreviated as "x". That's the reason why these helpers are named like this.
Summary
Functions
Parses and normalizes HTML into a tree structure at compile-time.
Parses and normalizes HTML into a tree structure at runtime.
Renders template into a tree structure.
Functions
Parses and normalizes HTML into a tree structure at compile-time.
Examples
iex> ~X|<a href="#{href}">text</a>|
[{"a", [{"href", "\#{href}"}], ["text"]}]
Parses and normalizes HTML into a tree structure at runtime.
Different from ~X, the content between ~x is evaluated before parsing and normalizing.
Examples
iex> href = "https://example.com"
iex> ~x|<a href="#{href}">text</a>|
[{"a", [{"href", "https://example.com"}], ["text"]}]
Renders template into a tree structure.