在使用模板的时候总会报一个warning
[W] XTemplate evaluation exception: Cannot set property ‘innerHTML’ of null
查了一下API
ChildContentClearedWhenSettingInnerHTML : Boolean
true if created child elements lose their innerHTML when modifying the innerHTML of the parent element. This property is NOT available at application boot time. Only after the document ready event.
理解了一下,大概可能也没一理解透。但是beforerender是不行的!
本文探讨了一个常见的警告问题:在修改父元素的innerHTML属性时遇到的XTemplateevaluationexception错误。通过理解API文档,我们发现beforerender阶段不是解决问题的理想时机。
562

被折叠的 条评论
为什么被折叠?



