oncontentready :
Fires when the content of the element, to which the behavior is attached, has been completely parsed
ondocumentready:
Fires when the behavior's containing document has been completely parsed.
oncontentsave:
Fires just before the content of an element that is attached to an element behavior is saved or copied.
ondetach:
Fires before a behavior is detached from an element.
oncontentready 指当element所在的tag加载完毕
ondocumentready 指htc包含的document加载完毕
oncontentsave 当htc指定为可pesist,要求保存属性的时候...(例如要实现input type=text后退后能保持value的效果)
ondetach 相对 oncontentready , ondocumentready , HTC和element脱离时..
关于oncontentready和ondocumentready的区别
例如element是:
<you:tag> <option>1<option>2 </you:tag>
而htc的内容是:
<public:component>
</public:component>
<html><body>nested document</body></html>
那么oncontentready指 <you:tag/> 加载完毕
而ondocumentready指<html><body>nested document</body></html> 加载完毕.