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

Meta mechanism for providing additional information inside a Widget #507

@matt-gadd

Description

@matt-gadd

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions