didact icon indicating copy to clipboard operation
didact copied to clipboard

updateDom in createDom function

Open Kuuga46 opened this issue 3 years ago • 2 comments

I don't understand why we excute 'updateDom' in the function 'createDom'.It seems that we would change the dom before 'commit',and that should not happen in 'performUnitOfWork' image

Kuuga46 avatar Mar 22 '22 12:03 Kuuga46

I found the reason: image

image

Kuuga46 avatar Mar 23 '22 01:03 Kuuga46

updateDom方法貌似只是用来处理dom元素的一些attributes以及一些事件绑定,创建了dom以后不就应该即可绑定属性、事件吗?而且updateDom里的逻辑也不存在把dom挂载到页面的行为,应该没问题吧?

ZhaoTim avatar Aug 10 '22 23:08 ZhaoTim