dojo / widget-core

:rocket: Dojo 2 - widget authoring system.
http://dojo.io
Other
34 stars 39 forks source link

Support after/deferred property callbacks when creating VDOM #714

Closed pottedmeat closed 6 years ago

pottedmeat commented 6 years ago

Enhancement

Some VDOM properties cannot be calculated before DOM has been rendered because they depend on values generated as part of the render. We should support a method of supplying a function to be called immediately after these values can be read once a render is complete. The returned value of this function would be applied to the rendered node.

agubler commented 6 years ago

@pottedmeat could you please add your specific use case for deferred property callbacks?

pottedmeat commented 6 years ago

For example, in some browsers scrollTop is automatically updated as content is added or removed "above the fold" inside a scrolling node. In others, it is not. To manually keep this value in sync, we need to know the size of the added content as well as where it is.

kitsonk commented 6 years ago

With all the changes is this use case still valid? If so, we should figure out what work to do, or otherwise close this issue.

matt-gadd commented 6 years ago

@kitsonk yup this is still valid, and we should now be able to implement given we have control of the vdom lifecycle.