Provide a way to extends all widgets by widget users
- Dominant language
- TypeScript
- Stars
- 623
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
**Enhancement**
Now, Dojo widgets only have builtin properties, it meets the common requirements.
But, I think widgets users should have some advanced requirement, for example, to extends `@dojo/widgets`'s per-widget to lazy add some feature.
It's something like [vue directive](http://vuejs.org/v2/guide/custom-directive.html), which is a special property, can apply all widgets, but not need to defined in per-widget(Open Closed Principle).
```tsx
```
`d-xx` is a dojo directive, but not need to define in `MyWidgetProperties`.
Dojo can support built-in directives and support custom directives.
widget users not need the rewrite `@dojo/widgets`‘s widgets, througth Dojo directive, widget users can extends all/part of widgets.
If Dojo support directive, I can easily let all my widgets support editing in visual page editor : ).
Maybe can also easily do something like dojo/widgets#1428 .
Dojo directive can be design to a optional feature through `dojo/has`.
Contributor guide
Assessment
This issue has not been assessed yet.