Syntax: Inline Data


The Xen HTML API allows you to completely avoid writing JavaScript in many cases. This is through the use of Inline Syntax, with the idea that you are able to reference data directly in your HTML markup.

An example is as follows:

    <p id="temperature">{ }</p>
    <p id="city">{ }</p>

This will automatically be updated whenever changes happen to the data, meaning the above is all you need for a simple widget.

Behind the scenes

For this to work, the Xen HTML API integrates with tinybind. This integration means that all features of tinybind are available by default, and is not limited to replacing text inside of elements.

result-matching ""

    No results matching ""