Open mmaxwell opened 11 years ago
This sort of conversion seems like it may potentially be unsafe, given that _Widget brings in some of the automatic onClick etc camelcased DOM events. Does seem like it might be a good idea to issue some sort of notice/warning when using _Widget (or _Templated) though.
In the source of _Widget, it states "Old base class for widgets. New widgets should extend dijit/_WidgetBase instead". If the goal of this tool is to help in converting from older versions of dojo to 2.0, it seems like this should be what we want to do.
In this case it's not about moving forward, it's about not breaking existing code. As Brian stated, _Widget
contains stuff that _WidgetBase
does not, so upconverting from _Widget
to _WidgetBase
might cause regressions in people's code.
I do like the idea of having some sort of flag or way to issue a warning, though, as a handy tip.
FYI, conversion of _Widget to _WidgetBase is pretty complicated:
Ideally you could do the conversion but it's a lot of work.
I believe we are holding off on this piece until _Widget goes away.
_Widget is not converted to dijit/_WidgetBase.