View Source Phoenix.LiveView.HTMLEngine (Phoenix LiveView v0.18.11)
The HTMLEngine that powers .heex
templates and the ~H
sigil.
It works by adding a HTML parsing and validation layer on top
of EEx engine. By default it uses Phoenix.LiveView.Engine
as
its "subengine".
Link to this section Summary
Functions
Renders a component defined by the given function.
Define a inner block, generally used by slots.
Link to this section Functions
Renders a component defined by the given function.
This function is rarely invoked directly by users. Instead, it is used by ~H
to render Phoenix.Component
s. For example, the following:
<MyApp.Weather.city name="Kraków" />
Is the same as:
<%= component(
&MyApp.Weather.city/1,
[name: "Kraków"],
{__ENV__.module, __ENV__.function, __ENV__.file, __ENV__.line}
) %>
Define a inner block, generally used by slots.
This macro is mostly used by HTML engines that provide
a slot
implementation and rarely called directly. The
name
must be the assign name the slot/block will be stored
under.
If you're using HEEx templates, you should use its higher
level <:slot>
notation instead. See Phoenix.Component
for more information.