live

  • property
2.0.4

{Object}

 

Setup live-binding between the DOM and a compute manually.

Object

Use

can.view.live is an object with utlitiy methods for setting up live-binding in relation to different parts of the DOM and DOM elements. For example, to make an <h2>'s text stay live with a compute:

var text = can.compute("Hello World");
var textNode = $("h2").text(" ")[0].childNodes[0];
can.view.live.text(textNode, text);