data

  • property
 

can.data

can.data is used to store arbitrary data on an element. Dojo does not support this, so we implement it itself.

The important part is to call cleanData on any elements that are removed from the DOM. For this to happen, we overwrite

-dojo.empty -dojo.destroy -dojo.place when "replace" is used TODO!!!!

For can.Control, we also need to trigger a non bubbling event when an element is removed. We do this also in cleanData.