View Source Hologram.Template.Helpers (hologram v0.2.0)
Summary
Functions
Determines whether the given tag is an element or a component.
Determines whether the given tag name belongs to a void element.
Functions
@spec tag_type(String.t()) :: :component | :element
Determines whether the given tag is an element or a component.
Examples
iex> tag_type("div")
:element
iex> tag_type("MyComponent")
:component
Determines whether the given tag name belongs to a void element.
Examples
iex> void_element?("br")
true
iex> void_element?("div")
false