CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 38
Meta mechanism for providing additional information inside a Widget #507
Description
Enhancement
As part of a bigger plan to reduce/remove dom access when authoring widgets, we need a way to flexibly allow users to access certain information about dom nodes and other things associated with them. A typical example in the https://github.com/dojo/widgets repo would be the need to access dimensions such as offsetTop
, scrollTop
etc from an element.
Ideally this meta functionality in WidgetBase
would be flexible to have implementations injected into it, and hooks so that we do not need to build every meta type into WidgetBase
nor have to extend WidgetBase
with mixins for each type. The return types should correctly type also.
With the above in place the meta implementations would be the only escape hatches to access dom nodes via WidgetBase
(other than on event objects), and we will then hopefully be able to deprecate the lifecycle hooks afterCreateCallback
, afterUpdateCallback
as well as removing afterCreate
and afterUpdate
from VirtualDomProperties
.
Future additional meta implementations could include:
- State of animation players when using the Web Animation API
- Visibility/Intersection of elements using the Intersection Observer API