Shared vars [Dev]
Added in V4
Last updated
Added in V4
Last updated
Shared vars allows connections from the content of a element to others
Source element (one):
Source element with htms-out, then name of variable as value
Destination element (multiple):
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:
input
textarea
select
meter
progress