Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Meta mechanism for providing additional information inside a Widget #507

Closed
matt-gadd opened this issue May 12, 2017 · 0 comments
Closed
Assignees
Milestone

Comments

@matt-gadd
Copy link
Contributor

matt-gadd commented May 12, 2017

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 http://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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants