Calls updater whenever source produces a value. Useful when several fields from a value are needed to update an element.
updater
source
bindUpdate(source, `#someEl`, (v, el) => { el.setAttribute(`width`, v.width); el.setAttribute(`height`, v.height);}); Copy
bindUpdate(source, `#someEl`, (v, el) => { el.setAttribute(`width`, v.width); el.setAttribute(`height`, v.height);});
Returns a PipeDomBinding to manage binding
const b = bindUpdate(...);b.remove(); // Disconnect bindingb.remove(true); // Disconnect binding and remove elementb.el; // HTML element Copy
const b = bindUpdate(...);b.remove(); // Disconnect bindingb.remove(true); // Disconnect binding and remove elementb.el; // HTML element
Calls
updater
wheneversource
produces a value. Useful when several fields from a value are needed to update an element.Returns a PipeDomBinding to manage binding