html
2.0.4Live binds a compute's value to a collection of elements.
live.html(el, compute, parentNode, nodeList) 2.0.4
Live binds a compute's value to a collection of elements.
Parameters
-
el
{HTMLElement}
An html element to replace with the live-section.
-
compute
{can.compute(getterSetter, context)}
A can.compute whose value is HTML.
-
parentNode
{HTMLElement}
OptionalAn overwritable parentNode if
el
's parent is a documentFragment.Use
can.view.live.html
is used to setup incremental live-binding.// a compute that change's it's list var greeting = can.compute(function(){ return "Welcome <i>"+me.attr("name")+"</i>" }); var placeholder = document.createTextNode(" "); $("#greeting").append(placeholder); can.view.live.html( placeholder, greeting );
-
nodeList
{*}