Dojo widget description line is a temporary thing?
1 answer
To check if a Dijit widget actually inherits from a specific widget or Mixin, use the function isInstanceOf
like this:
var Widget = declare([_WidgetBase], {
name: "Widget_Name",
id: "some_id"
});
var widgetInstance = new Widget();
console.log(widgetInstance.isInstanceOf(Widget)); // True
console.log(widgetInstance.isInstanceOf(_WidgetBase)); // True
console.log(widgetInstance.isInstanceOf(_TemplatedMixin)); // False
You can see it in action from this jsfiddle .
+1
source to share