fx-output Elementref and valuevalue attribute to evaluate an expression in contextvalue attribute to evaluate an expression in context of its refcontext() function to use the parent contextvalue with predicateslot="label" for an accessible nameThe slotted label is rendered as visible text and also wired to the shadow-DOM
widget's aria-label, since a shadow-DOM boundary sits between the two
and an id/for reference can't cross it.
For demo purposes the fx-output element with mediatype have a blue border.
With mediatype "image" the bound value is expected to be a link to be dereferenced an
Same result can be achieved with a simple template expression. However for accessibility reasons (label)
and potentially attaching listeners the fx-output variant is still valid.
This works with the help of drawdown.js which needs to be imported in the page.
It uses a custom function to do the actual conversion and debounce to update every 300Millis
.