attrs

  • function
 

Keep attributes live to a can.compute.

live.attrs(el, compute, currentValue)

Keep attributes live to a can.compute.

Parameters

  1. el {HTMLElement}

    The element whos attributes will be kept live.

  2. compute {can.compute(getterSetter, context)}

    The compute.

  3. currentValue {*}

Use

var div = document.createElement('div');
var compute = can.compute("foo='bar' zed='ted'");
can.view.live.attr(div,compute);