Added in V4
Shared vars allows connections from the content of a element to others
Source element (one):
<input htms-out="name">
Source element with htms-out, then name of variable as value
Destination element (multiple):
<p htms-in="name"></p>
Destination element with htms-in, then name of variable as value
On update all elements with htms out will get a event listener on input and a mutation observer
For some elements it will modify the value attribute instead of the default innerHTML, these are:
value
innerHTML
input
textarea
select
meter
progress
Last updated 1 year ago