html
Live binds a compute's value to a collection of elements.
live.html(el, compute, [parentNode])
live.html is used to setup incremental live-binding on a block of html.
// a compute that changes its list
var greeting = compute(function(){
return "Welcome <i>"+me.attr("name")+"</i>"
});
var placeholder = document.createTextNode(" ");
$("#greeting").append(placeholder);
live.html(placeholder, greeting);
Parameters
- el
{HTMLElement}:An html element to replace with the live-section.
- compute
{can.compute}:A [can.compute] whose value is HTML.
- parentNode
{HTMLElement}:An overwritable parentNode if
el's parent is a documentFragment.